[Scummvm-git-logs] scummvm master -> 31d5ef4952c516044e71490a9eb9cffd95dcaca2

lephilousophe noreply at scummvm.org
Sun Jul 27 13:42:59 UTC 2025


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
2939619637 HPL1: Don't use GLAD to check for ARB multitexture
c079301d7b HPL1: Disable OpenGL when GLES(2) is forced
2a7a08b7b1 GRAPHICS: OPENGL: Support OpenGL classic without GLAD
31d5ef4952 HPL1: Enable back CI for emscripten


Commit: 2939619637356506f7e4f89ba35434656a5a6fd2
    https://github.com/scummvm/scummvm/commit/2939619637356506f7e4f89ba35434656a5a6fd2
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-07-27T15:42:54+02:00

Commit Message:
HPL1: Don't use GLAD to check for ARB multitexture

That's an extension present since OpenGL 1.2.1 so there is a high chance
it's present.
Do like other checks above and hardcode the result.

Changed paths:
    engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp


diff --git a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
index 02097f84ac5..17f5517f5a6 100644
--- a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
+++ b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
@@ -271,7 +271,7 @@ int cLowLevelGraphicsSDL::GetCaps(eGraphicCaps type) const {
 		return 1; // gl 1.4
 
 	case eGraphicCaps_GL_MultiTexture:
-		return GLAD_GL_ARB_multitexture; // gl 1.4
+		return 1; // gl 1.2.1
 
 	default:
 		break;


Commit: c079301d7bd8f025540e455e183e55bfa4424e4f
    https://github.com/scummvm/scummvm/commit/c079301d7bd8f025540e455e183e55bfa4424e4f
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-07-27T15:42:54+02:00

Commit Message:
HPL1: Disable OpenGL when GLES(2) is forced

There is not reason to build the OpenGL code on these contexts.

Changed paths:
    engines/hpl1/engine/game/low_level_game_setup.cpp
    engines/hpl1/engine/impl/CGProgram.cpp
    engines/hpl1/engine/impl/CGProgram.h
    engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
    engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
    engines/hpl1/engine/impl/OcclusionQueryOGL.cpp
    engines/hpl1/engine/impl/OcclusionQueryOGL.h
    engines/hpl1/engine/impl/SDLTexture.cpp
    engines/hpl1/engine/impl/SDLTexture.h
    engines/hpl1/engine/impl/VertexBufferOGL.cpp
    engines/hpl1/engine/impl/VertexBufferOGL.h
    engines/hpl1/engine/impl/VertexBufferVBO.cpp
    engines/hpl1/engine/impl/VertexBufferVBO.h
    engines/hpl1/graphics.cpp
    engines/hpl1/opengl.cpp
    engines/hpl1/opengl.h


diff --git a/engines/hpl1/engine/game/low_level_game_setup.cpp b/engines/hpl1/engine/game/low_level_game_setup.cpp
index 77d4fdfaff1..fd5432f4d49 100644
--- a/engines/hpl1/engine/game/low_level_game_setup.cpp
+++ b/engines/hpl1/engine/game/low_level_game_setup.cpp
@@ -32,7 +32,7 @@
 namespace hpl {
 
 static iLowLevelGraphics *createLowLevelGfx() {
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 	if (Hpl1::useOpenGL())
 		return hplNew(cLowLevelGraphicsSDL, ());
 #endif
diff --git a/engines/hpl1/engine/impl/CGProgram.cpp b/engines/hpl1/engine/impl/CGProgram.cpp
index 310a10f212c..9fce0b1c053 100644
--- a/engines/hpl1/engine/impl/CGProgram.cpp
+++ b/engines/hpl1/engine/impl/CGProgram.cpp
@@ -27,7 +27,7 @@
 
 #include "hpl1/engine/impl/CGProgram.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 #include "hpl1/engine/impl/SDLTexture.h"
 #include "hpl1/engine/system/low_level_system.h"
@@ -38,7 +38,6 @@
 #include "common/array.h"
 #include "common/str.h"
 #include "hpl1/debug.h"
-#include "hpl1/opengl.h"
 #include "math/matrix4.h"
 
 namespace hpl {
@@ -154,4 +153,4 @@ bool cCGProgram::SetMatrixf(const tString &asName, eGpuProgramMatrix mType,
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
diff --git a/engines/hpl1/engine/impl/CGProgram.h b/engines/hpl1/engine/impl/CGProgram.h
index 17d3b7f3feb..8b70fb4d338 100644
--- a/engines/hpl1/engine/impl/CGProgram.h
+++ b/engines/hpl1/engine/impl/CGProgram.h
@@ -32,8 +32,9 @@
 #include "hpl1/engine/graphics/GPUProgram.h"
 #include "hpl1/engine/math/MathTypes.h"
 #include "hpl1/engine/system/SystemTypes.h"
+#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 #include "graphics/opengl/shader.h"
 
@@ -72,5 +73,5 @@ private:
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
 #endif // HPL_CGPROGRAM_H
diff --git a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
index 17f5517f5a6..19ca4decfe6 100644
--- a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
+++ b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
@@ -43,9 +43,8 @@
 #include "hpl1/debug.h"
 #include "hpl1/engine/impl/OcclusionQueryOGL.h"
 #include "hpl1/graphics.h"
-#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -1808,4 +1807,4 @@ void cLowLevelGraphicsSDL::SetMatrixMode(eMatrix type) {
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
diff --git a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
index 9e1710e1d36..1b264da7311 100644
--- a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
+++ b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.h
@@ -35,7 +35,7 @@
 #include "hpl1/engine/math/MathTypes.h"
 #include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -313,5 +313,5 @@ private:
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
 #endif // HPL_LOWLEVELGRAPHICS_SDL_H
diff --git a/engines/hpl1/engine/impl/OcclusionQueryOGL.cpp b/engines/hpl1/engine/impl/OcclusionQueryOGL.cpp
index fb72f846e7e..a154bcd6f9e 100644
--- a/engines/hpl1/engine/impl/OcclusionQueryOGL.cpp
+++ b/engines/hpl1/engine/impl/OcclusionQueryOGL.cpp
@@ -26,9 +26,8 @@
  */
 
 #include "hpl1/engine/impl/OcclusionQueryOGL.h"
-#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -82,4 +81,4 @@ unsigned int cOcclusionQueryOGL::GetSampleCount() {
 //-----------------------------------------------------------------------
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HL1_USE_OPENGL
diff --git a/engines/hpl1/engine/impl/OcclusionQueryOGL.h b/engines/hpl1/engine/impl/OcclusionQueryOGL.h
index de67bccc051..021b745052e 100644
--- a/engines/hpl1/engine/impl/OcclusionQueryOGL.h
+++ b/engines/hpl1/engine/impl/OcclusionQueryOGL.h
@@ -30,8 +30,9 @@
 
 #include "common/scummsys.h"
 #include "hpl1/engine/graphics/OcclusionQuery.h"
+#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -52,5 +53,5 @@ public:
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
 #endif // HPL_OCCLUSION_QUERY_H
diff --git a/engines/hpl1/engine/impl/SDLTexture.cpp b/engines/hpl1/engine/impl/SDLTexture.cpp
index 9b026e3db40..ed003736714 100644
--- a/engines/hpl1/engine/impl/SDLTexture.cpp
+++ b/engines/hpl1/engine/impl/SDLTexture.cpp
@@ -33,9 +33,8 @@
 #include "hpl1/debug.h"
 #include "hpl1/engine/math/Math.h"
 #include "hpl1/engine/system/low_level_system.h"
-#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -654,4 +653,4 @@ GLenum cSDLTexture::GetGLWrap(eTextureWrap aMode) {
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
diff --git a/engines/hpl1/engine/impl/SDLTexture.h b/engines/hpl1/engine/impl/SDLTexture.h
index 330aee9c347..429c1389c78 100644
--- a/engines/hpl1/engine/impl/SDLTexture.h
+++ b/engines/hpl1/engine/impl/SDLTexture.h
@@ -32,8 +32,9 @@
 #include "hpl1/engine/graphics/Texture.h"
 #include "hpl1/engine/graphics/bitmap2D.h"
 #include "hpl1/engine/impl/LowLevelGraphicsSDL.h"
+#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -101,5 +102,5 @@ private:
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
 #endif // HPL_SDL_TEXTURE_H
diff --git a/engines/hpl1/engine/impl/VertexBufferOGL.cpp b/engines/hpl1/engine/impl/VertexBufferOGL.cpp
index 0c3ed98f831..4279e174142 100644
--- a/engines/hpl1/engine/impl/VertexBufferOGL.cpp
+++ b/engines/hpl1/engine/impl/VertexBufferOGL.cpp
@@ -30,7 +30,7 @@
 #include "hpl1/engine/math/Math.h"
 #include "hpl1/engine/system/low_level_system.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -507,4 +507,4 @@ void cVertexBufferOGL::SetVertexStates(tVertexFlag aFlags) {
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
diff --git a/engines/hpl1/engine/impl/VertexBufferOGL.h b/engines/hpl1/engine/impl/VertexBufferOGL.h
index 6a03490f4d6..eeb87a12d46 100644
--- a/engines/hpl1/engine/impl/VertexBufferOGL.h
+++ b/engines/hpl1/engine/impl/VertexBufferOGL.h
@@ -30,8 +30,9 @@
 
 #include "common/scummsys.h"
 #include "hpl1/engine/graphics/VertexBuffer.h"
+#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -92,5 +93,5 @@ private:
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
 #endif // HPL_RENDERER3D_OGL_H
diff --git a/engines/hpl1/engine/impl/VertexBufferVBO.cpp b/engines/hpl1/engine/impl/VertexBufferVBO.cpp
index fa98985a03a..53a378c5ccc 100644
--- a/engines/hpl1/engine/impl/VertexBufferVBO.cpp
+++ b/engines/hpl1/engine/impl/VertexBufferVBO.cpp
@@ -28,9 +28,8 @@
 #include "hpl1/engine/impl/VertexBufferVBO.h"
 #include "hpl1/engine/math/Math.h"
 #include "hpl1/engine/system/low_level_system.h"
-#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -683,4 +682,4 @@ Log("\n");
 }
 }*/
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
diff --git a/engines/hpl1/engine/impl/VertexBufferVBO.h b/engines/hpl1/engine/impl/VertexBufferVBO.h
index 099f6fa473a..e7633126a34 100644
--- a/engines/hpl1/engine/impl/VertexBufferVBO.h
+++ b/engines/hpl1/engine/impl/VertexBufferVBO.h
@@ -30,8 +30,9 @@
 
 #include "common/scummsys.h"
 #include "hpl1/engine/graphics/VertexBuffer.h"
+#include "hpl1/opengl.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace hpl {
 
@@ -99,5 +100,5 @@ private:
 
 } // namespace hpl
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
 #endif // HPL_RENDERER3D_VBO_H
diff --git a/engines/hpl1/graphics.cpp b/engines/hpl1/graphics.cpp
index 6f71459edeb..6f55304c957 100644
--- a/engines/hpl1/graphics.cpp
+++ b/engines/hpl1/graphics.cpp
@@ -28,6 +28,7 @@
 
 namespace Hpl1 {
 
+#ifdef HPL1_USE_OPENGL
 static Graphics::RendererType getBestRendererType() {
 	Common::String renderConfig = ConfMan.get("renderer");
 	Graphics::RendererType desiredRendererType = Graphics::Renderer::parseTypeCode(renderConfig);
@@ -37,13 +38,18 @@ static Graphics::RendererType getBestRendererType() {
 	return Graphics::Renderer::getBestMatchingType(
 		desiredRendererType, availableRendererTypes);
 }
+#endif
 
 bool areShadersAvailable() {
+#ifdef HPL1_USE_OPENGL
 	return getBestRendererType() == Graphics::kRendererTypeOpenGLShaders;
+#else
+	return false;
+#endif
 }
 
 Common::ScopedPtr<Graphics::Surface> createViewportScreenshot() {
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 	return createGLViewportScreenshot();
 #else
 	return nullptr;
@@ -51,9 +57,13 @@ Common::ScopedPtr<Graphics::Surface> createViewportScreenshot() {
 }
 
 bool useOpenGL() {
+#ifdef HPL1_USE_OPENGL
 	Graphics::RendererType bestRendererType = getBestRendererType();
 	return bestRendererType == Graphics::kRendererTypeOpenGL ||
 	       bestRendererType == Graphics::kRendererTypeOpenGLShaders;
+#else
+	return false;
+#endif
 }
 
-} // namespace Hpl1
\ No newline at end of file
+} // namespace Hpl1
diff --git a/engines/hpl1/opengl.cpp b/engines/hpl1/opengl.cpp
index 6312f229de9..9e5b3460f32 100644
--- a/engines/hpl1/opengl.cpp
+++ b/engines/hpl1/opengl.cpp
@@ -25,7 +25,7 @@
 #include "graphics/surface.h"
 #include "hpl1/debug.h"
 
-#ifdef USE_OPENGL
+#ifdef HPL1_USE_OPENGL
 
 namespace Hpl1 {
 
@@ -68,4 +68,4 @@ Common::ScopedPtr<Graphics::Surface> createGLViewportScreenshot() {
 
 } // End of namespace Hpl1
 
-#endif // USE_OPENGL
+#endif // HPL1_USE_OPENGL
diff --git a/engines/hpl1/opengl.h b/engines/hpl1/opengl.h
index a0607a54d16..1b2a47a35f1 100644
--- a/engines/hpl1/opengl.h
+++ b/engines/hpl1/opengl.h
@@ -27,7 +27,9 @@
 #include "graphics/opengl/context.h"
 #include "graphics/opengl/system_headers.h"
 
-#ifdef USE_OPENGL
+#if defined(USE_OPENGL) && !USE_FORCED_GLES2 && !USE_FORCED_GLES
+
+#define HPL1_USE_OPENGL
 
 namespace Graphics {
 
@@ -51,5 +53,5 @@ Common::ScopedPtr<Graphics::Surface> createGLViewportScreenshot();
 #define GL_CHECK_FN() \
 	{ ::Hpl1::checkOGLErrors(__func__, __FILE__, __LINE__); }
 
-#endif // USE_OPENGL
+#endif // defined(USE_OPENGL) && !USE_FORCED_GLES2 && !USE_FORCED_GLES
 #endif // HPL1_OPENGL_H


Commit: 2a7a08b7b19b566a6a83413eaa6e5c407dc39bd4
    https://github.com/scummvm/scummvm/commit/2a7a08b7b19b566a6a83413eaa6e5c407dc39bd4
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-07-27T15:42:54+02:00

Commit Message:
GRAPHICS: OPENGL: Support OpenGL classic without GLAD

Changed paths:
    graphics/opengl/system_headers.h


diff --git a/graphics/opengl/system_headers.h b/graphics/opengl/system_headers.h
index ddc17bdf7a3..b4f824ad741 100644
--- a/graphics/opengl/system_headers.h
+++ b/graphics/opengl/system_headers.h
@@ -82,6 +82,13 @@
 	#endif
 	#undef GL_GLEXT_PROTOTYPES
 
+#else
+
+#define GL_GLEXT_PROTOTYPES
+#include <GL/gl.h>
+#include <GL/glext.h>
+#undef GL_GLEXT_PROTOTYPES
+
 #endif
 #endif
 


Commit: 31d5ef4952c516044e71490a9eb9cffd95dcaca2
    https://github.com/scummvm/scummvm/commit/31d5ef4952c516044e71490a9eb9cffd95dcaca2
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2025-07-27T15:42:54+02:00

Commit Message:
HPL1: Enable back CI for emscripten

Changed paths:
    .github/workflows/ci.yml


diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 74d7386666c..ec379fbf3d8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
       - uses: actions/checkout at v4
       - name: Call configure
         run: |
-          dists/emscripten/build.sh configure --enable-all-engines --disable-engines=hpl1 ${{ matrix.configFlags }}
+          dists/emscripten/build.sh configure --enable-all-engines ${{ matrix.configFlags }}
       - name: Build cache
         uses: hendrikmuhs/ccache-action at v1.2
         with:




More information about the Scummvm-git-logs mailing list