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 + #include + #else + #include + #include + #endif + #undef GL_GLEXT_PROTOTYPES + #endif #endif