[Scummvm-git-logs] scummvm master -> 460bc32cd9534bb2218f000e8cfe5015197dc1b8
aquadran
noreply at scummvm.org
Mon Mar 7 16:40:06 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
460bc32cd9 OPENGL: Fix OpenGL ES v1 builds without GLAD
Commit: 460bc32cd9534bb2218f000e8cfe5015197dc1b8
https://github.com/scummvm/scummvm/commit/460bc32cd9534bb2218f000e8cfe5015197dc1b8
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-03-07T17:40:01+01:00
Commit Message:
OPENGL: Fix OpenGL ES v1 builds without GLAD
Changed paths:
backends/graphics/opengl/context.cpp
configure
graphics/opengl/system_headers.h
diff --git a/backends/graphics/opengl/context.cpp b/backends/graphics/opengl/context.cpp
index a382f55aab2..57050c638c0 100644
--- a/backends/graphics/opengl/context.cpp
+++ b/backends/graphics/opengl/context.cpp
@@ -204,8 +204,10 @@ void OpenGLGraphicsManager::initializeGLContext() {
}
// Log features supported by GL context.
+#if !USE_FORCED_GLES
if (g_context.shadersSupported)
debug(5, "GLSL version: %s", glGetString(GL_SHADING_LANGUAGE_VERSION));
+#endif
debug(5, "OpenGL vendor: %s", glGetString(GL_VENDOR));
debug(5, "OpenGL renderer: %s", glGetString(GL_RENDERER));
debug(5, "OpenGL: NPOT texture support: %d", g_context.NPOTSupported);
diff --git a/configure b/configure
index 72cd9da8bd1..f7f9efc578d 100755
--- a/configure
+++ b/configure
@@ -5400,8 +5400,9 @@ if test "$_opengl_glad" = "no" -a "$_opengl_mode" != "none"; then
# 1) GL/gl.h This is usually used on POSIX and Windows systems
# 2) OpenGL/gl.h This is used on macOS
# 3) GLES2/gl2.h This is used for OpenGL ES 2.x
+ # 3) GLES/gl.h This is used for OpenGL ES 1.x
_opengl_can_compile=no
- for i in "GL/gl.h" "OpenGL/gl.h" "GLES2/gl2.h"; do
+ for i in "GL/gl.h" "OpenGL/gl.h" "GLES2/gl2.h" "GLES/gl.h"; do
# Test the current header for OpenGL
if test "$_opengl_mode" = "gl" -o "$_opengl_mode" = "any" ; then
cat > $TMPC << EOF
@@ -5449,6 +5450,11 @@ EOF
break
fi
done
+ elif test "$_opengl_mode" = "gles" ; then
+ OPENGL_LIBS="-lGLESv1_CM"
+ if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS; then
+ _opengl_can_compile=yes
+ fi
else
case $_host_os in
darwin*)
diff --git a/graphics/opengl/system_headers.h b/graphics/opengl/system_headers.h
index 7b6c2e3b6dd..4f8b8d1722b 100644
--- a/graphics/opengl/system_headers.h
+++ b/graphics/opengl/system_headers.h
@@ -84,6 +84,18 @@
#define GL_MAX_SAMPLES 0x8D57
#endif
+#elif USE_FORCED_GLES
+
+ #define GL_GLEXT_PROTOTYPES
+ #if defined(IPHONE)
+ #include <OpenGLES/ES1/gl.h>
+ #include <OpenGLES/ES1/glext.h>
+ #else
+ #include <GLES/gl.h>
+ #include <GLES/glext.h>
+ #endif
+ #undef GL_GLEXT_PROTOTYPES
+
#endif
#endif
More information about the Scummvm-git-logs
mailing list