[Scummvm-git-logs] scummvm master -> 4d206e52862eefc185a45298b1107cb42b7129da

aquadran noreply at scummvm.org
Wed Nov 17 23:56:26 UTC 2021


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:
4d206e5286 GRAPHICS: Clean up OpenGL defines (#3551)


Commit: 4d206e52862eefc185a45298b1107cb42b7129da
    https://github.com/scummvm/scummvm/commit/4d206e52862eefc185a45298b1107cb42b7129da
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2021-11-18T00:56:21+01:00

Commit Message:
GRAPHICS: Clean up OpenGL defines (#3551)

Changed paths:
    backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
    backends/graphics3d/openglsdl/openglsdl-graphics3d.h
    configure
    engines/grim/gfx_opengl.cpp
    engines/grim/gfx_opengl_shaders.cpp
    engines/grim/grim.cpp
    engines/myst3/gfx.cpp
    engines/myst3/gfx_opengl.cpp
    engines/myst3/gfx_opengl_shaders.cpp
    engines/myst3/gfx_opengl_texture.cpp
    engines/playground3d/gfx.cpp
    engines/playground3d/gfx_opengl.cpp
    engines/playground3d/gfx_opengl_shaders.cpp
    engines/stark/gfx/driver.cpp
    engines/stark/gfx/opengls.cpp
    engines/stark/gfx/opengls.h
    engines/stark/gfx/openglsactor.cpp
    engines/stark/gfx/openglsactor.h
    engines/stark/gfx/openglsfade.cpp
    engines/stark/gfx/openglsfade.h
    engines/stark/gfx/openglsprop.cpp
    engines/stark/gfx/openglsprop.h
    engines/stark/gfx/openglssurface.cpp
    engines/stark/gfx/openglssurface.h
    engines/stark/gfx/opengltexture.cpp
    engines/stark/gfx/opengltexture.h
    engines/wintermute/base/base_game.cpp
    engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
    engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
    engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
    engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
    engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
    engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
    engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
    engines/wintermute/base/gfx/opengl/mesh3ds_opengl.h
    engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
    engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.h
    engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
    engines/wintermute/base/gfx/opengl/meshx_opengl.h
    engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
    engines/wintermute/base/gfx/opengl/meshx_opengl_shader.h
    engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
    engines/wintermute/base/gfx/opengl/shadow_volume_opengl.h
    engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
    engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.h
    graphics/opengl/box_shaders.cpp
    graphics/opengl/compat_shaders.cpp
    graphics/opengl/context.cpp
    graphics/opengl/control_shaders.cpp
    graphics/opengl/framebuffer.cpp
    graphics/opengl/framebuffer.h
    graphics/opengl/shader.cpp
    graphics/opengl/surfacerenderer.cpp
    graphics/opengl/surfacerenderer.h
    graphics/opengl/texture.cpp
    graphics/opengl/texture.h
    graphics/opengl/tiledsurface.cpp


diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
index 03b589b6ac..b8cb7231d1 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp
@@ -22,7 +22,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #include "backends/graphics3d/openglsdl/openglsdl-graphics3d.h"
 
diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
index cee3bd1a57..38747c55bf 100644
--- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
+++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h
@@ -27,7 +27,7 @@
 
 #include "math/rect2d.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 	class FrameBuffer;
@@ -194,6 +194,6 @@ protected:
 	TransactionMode _transactionMode;
 };
 
-#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/configure b/configure
index 8808342063..8f98e344d5 100755
--- a/configure
+++ b/configure
@@ -162,7 +162,7 @@ _fluidlite=auto
 _glew=auto
 _opengl_mode=auto
 _opengl_game=auto
-_opengl_game_classic=no
+_opengl_game_classic=auto
 _opengl_game_shaders=auto
 _opengl_game_es2=no
 _tinygl=yes
@@ -1170,6 +1170,7 @@ for ac_option in $@; do
 	--enable-glew)                _glew=yes              ;;
 	--disable-glew)               _glew=no               ;;
 	--disable-opengl-game)        _opengl_game=no        ;;
+	--disable-opengl-game-classic) _opengl_game_classic=no ;;
 	--disable-opengl-game-shaders) _opengl_game_shaders=no ;;
 	--force-opengl-game-es2)      _opengl_game_es2=yes   ;;
 	--enable-tinygl)              _tinygl=yes            ;;
@@ -5529,8 +5530,7 @@ EOF
 			if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS $lib
 				then
 				_opengl_game_es2=yes
-				append_var LIBS "$lib"
-				append_var LIBS_3D "$lib"
+				append_var OPENGL_LIBS "$lib"
 				break
 			fi
 		done
@@ -5556,7 +5556,9 @@ EOF
 		append_var INCLUDES "$OPENGL_CFLAGS"
 		append_var LIBS "$OPENGL_LIBS"
 		append_var LIBS_3D "$OPENGL_LIBS"
-		_opengl_game_classic=yes
+		if test "$_opengl_game_classic" = auto ; then
+			_opengl_game_classic=yes
+		fi
 		if test "$_opengl_game_shaders" = auto; then
 			_opengl_game_shaders=$_glew
 		fi
@@ -5564,7 +5566,16 @@ EOF
 			echo "WARNING: OpenGL Shader support requires GLEW!"
 			_opengl_game_shaders=no
 		fi
+	elif test "$_opengl_game_es2" = "yes" ; then
+		append_var INCLUDES "$OPENGL_CFLAGS"
+		append_var LIBS "$OPENGL_LIBS"
+		append_var LIBS_3D "$OPENGL_LIBS"
+		_opengl_game_classic=no
+		if test "$_opengl_game_shaders" = auto ; then
+			_opengl_game_shaders=yes
+		fi
 	else
+		_opengl_game_classic=no
 		_opengl_game_shaders=no
 	fi
 	cc_check_clean
diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp
index 242329c6d0..fe097daaf7 100644
--- a/engines/grim/gfx_opengl.cpp
+++ b/engines/grim/gfx_opengl.cpp
@@ -24,7 +24,7 @@
 #include "common/system.h"
 #include "common/config-manager.h"
 
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "graphics/surface.h"
 #include "graphics/pixelbuffer.h"
diff --git a/engines/grim/gfx_opengl_shaders.cpp b/engines/grim/gfx_opengl_shaders.cpp
index c30d29451d..cf6075570f 100644
--- a/engines/grim/gfx_opengl_shaders.cpp
+++ b/engines/grim/gfx_opengl_shaders.cpp
@@ -42,7 +42,7 @@
 #include "common/system.h"
 #include "common/textconsole.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/surface.h"
 #include "graphics/pixelbuffer.h"
diff --git a/engines/grim/grim.cpp b/engines/grim/grim.cpp
index 199cb6ff1c..1e3ac49f7d 100644
--- a/engines/grim/grim.cpp
+++ b/engines/grim/grim.cpp
@@ -42,7 +42,7 @@
 #include "graphics/pixelbuffer.h"
 #include "graphics/renderer.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 #include "graphics/opengl/context.h"
 #endif
 
@@ -272,7 +272,7 @@ GfxBase *GrimEngine::createRenderer(int screenW, int screenH) {
 		initGraphics(screenW, screenH, nullptr);
 	}
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 	bool backendCapableOpenGL = g_system->hasFeature(OSystem::kFeatureOpenGLForGame);
 #endif
 
@@ -296,12 +296,12 @@ GfxBase *GrimEngine::createRenderer(int screenW, int screenH) {
 	}
 
 	GfxBase *renderer = nullptr;
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGLShaders) {
 		renderer = CreateGfxOpenGLShader();
 	}
 #endif
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGL) {
 		renderer = CreateGfxOpenGL();
 	}
diff --git a/engines/myst3/gfx.cpp b/engines/myst3/gfx.cpp
index 2f6c0947a7..8e27622be7 100644
--- a/engines/myst3/gfx.cpp
+++ b/engines/myst3/gfx.cpp
@@ -29,7 +29,7 @@
 #include "graphics/renderer.h"
 #include "graphics/surface.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 #include "graphics/opengl/context.h"
 #endif
 
@@ -209,7 +209,7 @@ Renderer *createRenderer(OSystem *system) {
 		initGraphics(width, height, nullptr);
 	}
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 	bool backendCapableOpenGL = g_system->hasFeature(OSystem::kFeatureOpenGLForGame);
 #endif
 
@@ -225,12 +225,12 @@ Renderer *createRenderer(OSystem *system) {
 		warning("Unable to create a '%s' renderer", rendererConfig.c_str());
 	}
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGLShaders) {
 		return CreateGfxOpenGLShader(system);
 	}
 #endif
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGL) {
 		return CreateGfxOpenGL(system);
 	}
diff --git a/engines/myst3/gfx_opengl.cpp b/engines/myst3/gfx_opengl.cpp
index 7f27984e39..bb7ffbe6d3 100644
--- a/engines/myst3/gfx_opengl.cpp
+++ b/engines/myst3/gfx_opengl.cpp
@@ -23,7 +23,7 @@
 #include "common/rect.h"
 #include "common/textconsole.h"
 
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "graphics/opengl/context.h"
 #include "graphics/surface.h"
diff --git a/engines/myst3/gfx_opengl_shaders.cpp b/engines/myst3/gfx_opengl_shaders.cpp
index dc26bdfae5..b4807bbb93 100644
--- a/engines/myst3/gfx_opengl_shaders.cpp
+++ b/engines/myst3/gfx_opengl_shaders.cpp
@@ -39,7 +39,7 @@
 #include "common/rect.h"
 #include "common/textconsole.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/surface.h"
 
diff --git a/engines/myst3/gfx_opengl_texture.cpp b/engines/myst3/gfx_opengl_texture.cpp
index 9654011f4d..6ba194e737 100644
--- a/engines/myst3/gfx_opengl_texture.cpp
+++ b/engines/myst3/gfx_opengl_texture.cpp
@@ -22,7 +22,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #include "engines/myst3/gfx_opengl_texture.h"
 
diff --git a/engines/playground3d/gfx.cpp b/engines/playground3d/gfx.cpp
index f6114abc6c..7046ef7d0b 100644
--- a/engines/playground3d/gfx.cpp
+++ b/engines/playground3d/gfx.cpp
@@ -29,7 +29,7 @@
 #include "graphics/renderer.h"
 #include "graphics/surface.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 #include "graphics/opengl/context.h"
 #endif
 
@@ -130,7 +130,7 @@ Renderer *createRenderer(OSystem *system) {
 		initGraphics(width, height, nullptr);
 	}
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 	bool backendCapableOpenGL = g_system->hasFeature(OSystem::kFeatureOpenGLForGame);
 #endif
 
@@ -146,12 +146,12 @@ Renderer *createRenderer(OSystem *system) {
 		warning("Unable to create a '%s' renderer", rendererConfig.c_str());
 	}
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGLShaders) {
 		return CreateGfxOpenGLShader(system);
 	}
 #endif
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGL) {
 		return CreateGfxOpenGL(system);
 	}
diff --git a/engines/playground3d/gfx_opengl.cpp b/engines/playground3d/gfx_opengl.cpp
index c7c75bff84..4b1a9efbae 100644
--- a/engines/playground3d/gfx_opengl.cpp
+++ b/engines/playground3d/gfx_opengl.cpp
@@ -23,7 +23,7 @@
 #include "common/rect.h"
 #include "common/textconsole.h"
 
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "graphics/opengl/context.h"
 #include "graphics/surface.h"
diff --git a/engines/playground3d/gfx_opengl_shaders.cpp b/engines/playground3d/gfx_opengl_shaders.cpp
index 72aad7021d..c33c0ecf84 100644
--- a/engines/playground3d/gfx_opengl_shaders.cpp
+++ b/engines/playground3d/gfx_opengl_shaders.cpp
@@ -23,7 +23,7 @@
 #include "common/rect.h"
 #include "common/textconsole.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/surface.h"
 
diff --git a/engines/stark/gfx/driver.cpp b/engines/stark/gfx/driver.cpp
index a8abe1a7ad..91e783c943 100644
--- a/engines/stark/gfx/driver.cpp
+++ b/engines/stark/gfx/driver.cpp
@@ -30,7 +30,7 @@
 
 #include "graphics/renderer.h"
 #include "graphics/surface.h"
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 #include "graphics/opengl/context.h"
 #endif
 
@@ -46,14 +46,14 @@ Driver *Driver::create() {
 	Graphics::RendererType desiredRendererType = Graphics::parseRendererTypeCode(rendererConfig);
 	Graphics::RendererType matchingRendererType = Graphics::getBestMatchingAvailableRendererType(desiredRendererType);
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 	bool softRenderer = matchingRendererType == Graphics::kRendererTypeTinyGL;
 	if (!softRenderer) {
 		initGraphics3d(kOriginalWidth, kOriginalHeight);
 	} else {
 #endif
 		initGraphics(kOriginalWidth, kOriginalHeight, nullptr);
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 	}
 #endif
 
@@ -64,13 +64,13 @@ Driver *Driver::create() {
 
 	Driver *driver = nullptr;
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 	bool backendCapableOpenGLShaders = g_system->hasFeature(OSystem::kFeatureOpenGLForGame) && OpenGLContext.shadersSupported;
 	if (backendCapableOpenGLShaders && matchingRendererType == Graphics::kRendererTypeOpenGLShaders) {
 		driver = new OpenGLSDriver();
 	}
 #endif
-#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 	bool backendCapableOpenGL = g_system->hasFeature(OSystem::kFeatureOpenGLForGame);
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGL) {
 		driver = new OpenGLDriver();
diff --git a/engines/stark/gfx/opengls.cpp b/engines/stark/gfx/opengls.cpp
index 84e87d4e1c..fc9ff22323 100644
--- a/engines/stark/gfx/opengls.cpp
+++ b/engines/stark/gfx/opengls.cpp
@@ -26,7 +26,7 @@
 
 #include "math/matrix4.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/stark/gfx/openglsactor.h"
 #include "engines/stark/gfx/openglsprop.h"
@@ -238,4 +238,4 @@ Graphics::Surface *OpenGLSDriver::getViewportScreenshot() const {
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/opengls.h b/engines/stark/gfx/opengls.h
index 6925b582f6..c61ea9136f 100644
--- a/engines/stark/gfx/opengls.h
+++ b/engines/stark/gfx/opengls.h
@@ -25,7 +25,7 @@
 
 #include "common/system.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/stark/gfx/driver.h"
 
@@ -88,6 +88,6 @@ private:
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif // STARK_GFX_OPENGLS_H
diff --git a/engines/stark/gfx/openglsactor.cpp b/engines/stark/gfx/openglsactor.cpp
index 31bafb69dd..de794c68c7 100644
--- a/engines/stark/gfx/openglsactor.cpp
+++ b/engines/stark/gfx/openglsactor.cpp
@@ -30,7 +30,7 @@
 #include "engines/stark/gfx/opengls.h"
 #include "engines/stark/gfx/texture.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -429,4 +429,4 @@ bool OpenGLSActorRenderer::getSpotLightContribution(LightEntry *light,
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/openglsactor.h b/engines/stark/gfx/openglsactor.h
index d2790386f7..9c2aec92df 100644
--- a/engines/stark/gfx/openglsactor.h
+++ b/engines/stark/gfx/openglsactor.h
@@ -31,7 +31,7 @@
 
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 	class ShaderGL;
@@ -77,6 +77,6 @@ protected:
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif // STARK_GFX_OPENGL_S_ACTOR_H
diff --git a/engines/stark/gfx/openglsfade.cpp b/engines/stark/gfx/openglsfade.cpp
index f56b9c217c..d3818efd64 100644
--- a/engines/stark/gfx/openglsfade.cpp
+++ b/engines/stark/gfx/openglsfade.cpp
@@ -24,7 +24,7 @@
 
 #include "engines/stark/gfx/opengls.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -55,4 +55,4 @@ void OpenGLSFadeRenderer::render(float fadeLevel) {
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/openglsfade.h b/engines/stark/gfx/openglsfade.h
index 96b941dfa5..4914504619 100644
--- a/engines/stark/gfx/openglsfade.h
+++ b/engines/stark/gfx/openglsfade.h
@@ -25,7 +25,7 @@
 
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/stark/gfx/faderenderer.h"
 
@@ -57,6 +57,6 @@ private:
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif // STARK_GFX_OPENGL_S_FADE_H
diff --git a/engines/stark/gfx/openglsprop.cpp b/engines/stark/gfx/openglsprop.cpp
index 45f11a2591..7457e4e1fd 100644
--- a/engines/stark/gfx/openglsprop.cpp
+++ b/engines/stark/gfx/openglsprop.cpp
@@ -28,7 +28,7 @@
 #include "engines/stark/scene.h"
 #include "engines/stark/services/services.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -191,4 +191,4 @@ void OpenGLSPropRenderer::setLightArrayUniform(const LightEntryArray &lights) {
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/openglsprop.h b/engines/stark/gfx/openglsprop.h
index de03dfc27c..a73ac52ce0 100644
--- a/engines/stark/gfx/openglsprop.h
+++ b/engines/stark/gfx/openglsprop.h
@@ -31,7 +31,7 @@
 
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 	class ShaderGL;
@@ -74,4 +74,4 @@ protected:
 
 #endif // STARK_GFX_OPENGL_S_RENDERED_H
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/openglssurface.cpp b/engines/stark/gfx/openglssurface.cpp
index f0317d65c5..f7fc6ae8f2 100644
--- a/engines/stark/gfx/openglssurface.cpp
+++ b/engines/stark/gfx/openglssurface.cpp
@@ -25,7 +25,7 @@
 #include "engines/stark/gfx/opengls.h"
 #include "engines/stark/gfx/texture.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -83,4 +83,4 @@ Math::Vector2d OpenGLSSurfaceRenderer::normalizeCurrentCoordinates(int x, int y)
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // if defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/openglssurface.h b/engines/stark/gfx/openglssurface.h
index 484b0039b9..c9fe32b2c0 100644
--- a/engines/stark/gfx/openglssurface.h
+++ b/engines/stark/gfx/openglssurface.h
@@ -27,7 +27,7 @@
 
 #include "math/vector2d.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 class ShaderGL;
@@ -62,6 +62,6 @@ private:
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif // STARK_GFX_OPENGL_S_SURFACE_H
diff --git a/engines/stark/gfx/opengltexture.cpp b/engines/stark/gfx/opengltexture.cpp
index 281a4d5f6c..96a1ee4284 100644
--- a/engines/stark/gfx/opengltexture.cpp
+++ b/engines/stark/gfx/opengltexture.cpp
@@ -26,7 +26,7 @@
 
 #include "graphics/surface.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace Stark {
 namespace Gfx {
@@ -130,4 +130,4 @@ void OpenGlTexture::addLevel(uint32 level, const Graphics::Surface *surface, con
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_OPENGL_GAME) || defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
diff --git a/engines/stark/gfx/opengltexture.h b/engines/stark/gfx/opengltexture.h
index 9eb327c2e7..a198d0b92c 100644
--- a/engines/stark/gfx/opengltexture.h
+++ b/engines/stark/gfx/opengltexture.h
@@ -27,7 +27,7 @@
 
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace Stark {
 namespace Gfx {
@@ -57,6 +57,6 @@ protected:
 } // End of namespace Gfx
 } // End of namespace Stark
 
-#endif // defined(USE_OPENGL_GAME) || defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #endif // STARK_GFX_OPENGL_TEXTURE_H
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index 3078ef626e..0456aa5b1c 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -84,7 +84,7 @@
 #ifdef ENABLE_WME3D
 #include "graphics/renderer.h"
 #include "engines/util.h"
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 #include "graphics/opengl/context.h"
 #endif
 #endif
@@ -514,7 +514,7 @@ bool BaseGame::initialize2() { // we know whether we are going to be accelerated
 		return STATUS_OK;
 	}
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 	initGraphics3d(_settings->getResWidth(), _settings->getResHeight());
 	bool backendCapableOpenGL = g_system->hasFeature(OSystem::kFeatureOpenGLForGame);
 #endif
@@ -531,11 +531,11 @@ bool BaseGame::initialize2() { // we know whether we are going to be accelerated
 		warning("Unable to create a '%s' renderer", rendererConfig.c_str());
 	}
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGLShaders) {
 		_renderer3D = makeOpenGL3DShaderRenderer(this);
 	}
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 #if defined(USE_OPENGL_GAME)
 	if (backendCapableOpenGL && matchingRendererType == Graphics::kRendererTypeOpenGL) {
 		_renderer3D = makeOpenGL3DRenderer(this);
@@ -546,7 +546,7 @@ bool BaseGame::initialize2() { // we know whether we are going to be accelerated
 		error("3D software renderered is not supported yet");
 	}
 	_renderer = _renderer3D;
-#if !defined(USE_OPENGL_GAME) && !defined(USE_OPENGL_SHADERS) && !defined(USE_GLES2)
+#if !defined(USE_OPENGL_GAME) && !defined(USE_OPENGL_SHADERS)
 	if (!_playing3DGame && !_renderer3D)
 		_renderer = makeOSystemRenderer(this);
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
index acde945419..4499b1a0a2 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.cpp
@@ -29,7 +29,7 @@
 #include "graphics/opengl/system_headers.h"
 #include "math/glmath.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "engines/wintermute/base/gfx/opengl/base_render_opengl3d.h"
 #include "engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h"
@@ -435,7 +435,7 @@ bool BaseRenderOpenGL3D::initRenderer(int width, int height, bool windowed) {
 	// Reset it!
 #if defined(USE_OPENGL_SHADERS)
 	glBindBuffer(GL_ARRAY_BUFFER, 0);
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 	return true;
 }
@@ -853,4 +853,4 @@ ShadowVolume *BaseRenderOpenGL3D::createShadowVolume() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
index 1ffb2bec9f..ea521b9639 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d.h
@@ -31,7 +31,7 @@
 #include "math/matrix4.h"
 #include "math/ray.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "graphics/opengl/system_headers.h"
 #include "graphics/opengl/texture.h"
@@ -154,6 +154,6 @@ private:
 
 } // wintermute namespace
 
-#endif // defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
index aebdc3aa74..fdaad71549 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.cpp
@@ -28,7 +28,7 @@
 #include "graphics/opengl/system_headers.h"
 #include "math/glmath.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h"
 #include "engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h"
@@ -842,4 +842,4 @@ ShadowVolume *BaseRenderOpenGL3DShader::createShadowVolume() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
index 4990ab5183..c379f4ee3a 100644
--- a/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
+++ b/engines/wintermute/base/gfx/opengl/base_render_opengl3d_shader.h
@@ -33,7 +33,7 @@
 #include "math/matrix4.h"
 #include "math/ray.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -161,6 +161,6 @@ private:
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
index 22b0424de7..e9a270503a 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.cpp
@@ -25,7 +25,7 @@
 #include "engines/wintermute/base/base_engine.h"
 #include "engines/wintermute/base/gfx/base_image.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #include "engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h"
 #include "engines/wintermute/base/gfx/opengl/base_render_opengl3d.h"
@@ -303,4 +303,4 @@ void BaseSurfaceOpenGL3D::setTexture() {
 
 } // End of namespace Wintermute
 
-#endif // defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
diff --git a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
index 4cb0d4bc62..c9bbfa5aec 100644
--- a/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
+++ b/engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h
@@ -26,7 +26,7 @@
 #include "engines/wintermute/base/gfx/base_surface.h"
 #include "graphics/opengl/texture.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace Wintermute {
 
@@ -82,6 +82,6 @@ private:
 
 } // End of namespace Wintermute
 
-#endif // defined(USE_OPENGL) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
index 17fa15d3d8..42e6290c75 100644
--- a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.cpp
@@ -23,7 +23,7 @@
 #include "engines/wintermute/wintypes.h"
 #include "graphics/opengl/system_headers.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "engines/wintermute/base/gfx/opengl/mesh3ds_opengl.h"
 
@@ -51,4 +51,4 @@ void Mesh3DSOpenGL::render() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
diff --git a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.h b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.h
index 95f56691b5..8269f113af 100644
--- a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.h
+++ b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl.h
@@ -25,7 +25,7 @@
 
 #include "engines/wintermute/base/gfx/3ds/mesh3ds.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 namespace Wintermute {
 
@@ -39,6 +39,6 @@ public:
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
index a681179c1a..3aaacdfb38 100644
--- a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.cpp
@@ -23,7 +23,7 @@
 #include "engines/wintermute/wintypes.h"
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.h"
 
@@ -70,4 +70,4 @@ void Mesh3DSOpenGLShader::render() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.h b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.h
index e3a1d7fac1..19d6973b2b 100644
--- a/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.h
+++ b/engines/wintermute/base/gfx/opengl/mesh3ds_opengl_shader.h
@@ -25,7 +25,7 @@
 
 #include "engines/wintermute/base/gfx/3ds/mesh3ds.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -46,6 +46,6 @@ private:
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp b/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
index d2e356d060..790a9da73e 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl.cpp
@@ -29,7 +29,7 @@
 #include "engines/wintermute/base/gfx/x/material.h"
 #include "graphics/opengl/system_headers.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h"
 #include "engines/wintermute/base/gfx/opengl/meshx_opengl.h"
@@ -89,4 +89,4 @@ bool MeshXOpenGL::renderFlatShadowModel() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl.h b/engines/wintermute/base/gfx/opengl/meshx_opengl.h
index 2f6ff31d71..961e2305ae 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl.h
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl.h
@@ -31,7 +31,7 @@
 
 #include "engines/wintermute/base/gfx/x/meshx.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 namespace Wintermute {
 
@@ -46,6 +46,6 @@ public:
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
index a721614741..b5bd7925f7 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.cpp
@@ -29,7 +29,7 @@
 #include "engines/wintermute/base/gfx/x/material.h"
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/wintermute/base/gfx/opengl/base_surface_opengl3d.h"
 #include "engines/wintermute/base/gfx/opengl/meshx_opengl_shader.h"
@@ -135,4 +135,4 @@ bool MeshXOpenGLShader::update(FrameNode *parentFrame) {
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.h b/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.h
index ff99e938d0..83807e2a90 100644
--- a/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.h
+++ b/engines/wintermute/base/gfx/opengl/meshx_opengl_shader.h
@@ -31,7 +31,7 @@
 
 #include "engines/wintermute/base/gfx/x/meshx.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -57,6 +57,6 @@ protected:
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
index fecf87d376..5c1a744382 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.cpp
@@ -30,7 +30,7 @@
 #include "engines/wintermute/dcgf.h"
 #include "graphics/opengl/system_headers.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 #include "engines/wintermute/base/gfx/opengl/base_render_opengl3d.h"
 #include "engines/wintermute/base/gfx/opengl/shadow_volume_opengl.h"
@@ -185,5 +185,5 @@ bool ShadowVolumeOpenGL::initMask() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
 
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.h b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.h
index c7a8de864b..a725691537 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.h
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl.h
@@ -31,7 +31,7 @@
 
 #include "engines/wintermute/base/gfx/shadow_volume.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME)
 
 namespace Wintermute {
 
@@ -51,6 +51,6 @@ private:
 
 } // namespace Wintermute
 
-#endif // defined(USE_OPENGL_GAME) && !defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME)
 
 #endif
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
index edb10730e1..fbd372005c 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.cpp
@@ -30,7 +30,7 @@
 #include "engines/wintermute/dcgf.h"
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "engines/wintermute/base/gfx/opengl/base_render_opengl3d.h"
 #include "engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.h"
@@ -204,4 +204,4 @@ bool ShadowVolumeOpenGLShader::initMask() {
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
diff --git a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.h b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.h
index 0ee85074d4..55e9bfe696 100644
--- a/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.h
+++ b/engines/wintermute/base/gfx/opengl/shadow_volume_opengl_shader.h
@@ -32,7 +32,7 @@
 #include "engines/wintermute/base/gfx/shadow_volume.h"
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
@@ -58,6 +58,6 @@ private:
 
 } // namespace Wintermute
 
-#endif // defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#endif // defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/graphics/opengl/box_shaders.cpp b/graphics/opengl/box_shaders.cpp
index e8d2889d9b..b38b452fe8 100644
--- a/graphics/opengl/box_shaders.cpp
+++ b/graphics/opengl/box_shaders.cpp
@@ -22,7 +22,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 namespace BuiltinShaders {
diff --git a/graphics/opengl/compat_shaders.cpp b/graphics/opengl/compat_shaders.cpp
index aa03fa99cb..fb8346dd6a 100644
--- a/graphics/opengl/compat_shaders.cpp
+++ b/graphics/opengl/compat_shaders.cpp
@@ -22,7 +22,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 namespace BuiltinShaders {
diff --git a/graphics/opengl/context.cpp b/graphics/opengl/context.cpp
index 541c97290c..a3e743f76b 100644
--- a/graphics/opengl/context.cpp
+++ b/graphics/opengl/context.cpp
@@ -29,7 +29,7 @@
 
 #include "graphics/opengl/system_headers.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace Common {
 DECLARE_SINGLETON(OpenGL::ContextGL);
diff --git a/graphics/opengl/control_shaders.cpp b/graphics/opengl/control_shaders.cpp
index 0933414d6b..1b016da240 100644
--- a/graphics/opengl/control_shaders.cpp
+++ b/graphics/opengl/control_shaders.cpp
@@ -22,7 +22,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 namespace BuiltinShaders {
diff --git a/graphics/opengl/framebuffer.cpp b/graphics/opengl/framebuffer.cpp
index dd938c613a..871e5f65a7 100644
--- a/graphics/opengl/framebuffer.cpp
+++ b/graphics/opengl/framebuffer.cpp
@@ -23,7 +23,7 @@
 #include "common/textconsole.h"
 #include "common/util.h"
 
-#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)) && !defined(AMIGAOS) && !defined(__MORPHOS__)
+#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(AMIGAOS) && !defined(__MORPHOS__)
 
 #if defined(SDL_BACKEND) && !defined(USE_GLEW) && !defined(USE_GLES2)
 #define GL_GLEXT_PROTOTYPES // For the GL_EXT_framebuffer_object extension
diff --git a/graphics/opengl/framebuffer.h b/graphics/opengl/framebuffer.h
index 91761a061d..41a6ee7774 100644
--- a/graphics/opengl/framebuffer.h
+++ b/graphics/opengl/framebuffer.h
@@ -26,7 +26,7 @@
 #include "graphics/opengl/system_headers.h"
 #include "graphics/opengl/texture.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 
@@ -75,6 +75,6 @@ private:
 
 } // End of namespace OpenGL
 
-#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #endif
diff --git a/graphics/opengl/shader.cpp b/graphics/opengl/shader.cpp
index cb152200eb..832c9b84f9 100644
--- a/graphics/opengl/shader.cpp
+++ b/graphics/opengl/shader.cpp
@@ -22,7 +22,7 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_GLES2) || defined(USE_OPENGL_SHADERS)
+#if defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/shader.h"
 
diff --git a/graphics/opengl/surfacerenderer.cpp b/graphics/opengl/surfacerenderer.cpp
index c5dd381a28..6e6a464d02 100644
--- a/graphics/opengl/surfacerenderer.cpp
+++ b/graphics/opengl/surfacerenderer.cpp
@@ -22,27 +22,27 @@
 
 #include "common/scummsys.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/surfacerenderer.h"
 
 #include "graphics/opengl/context.h"
 #include "graphics/opengl/texture.h"
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 #include "graphics/opengl/shader.h"
 #endif
 
 namespace OpenGL {
 
 SurfaceRenderer *createBestSurfaceRenderer() {
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 	if (OpenGLContext.shadersSupported) {
 		return new ShaderSurfaceRenderer();
 	}
 #endif
 
-#ifndef USE_GLES2
+#if defined(USE_OPENGL_GAME)
 	return new FixedSurfaceRenderer();
 #else
 	error("Could not create an appropriate surface renderer for the current OpenGL context");
@@ -71,7 +71,7 @@ void SurfaceRenderer::enableAlphaBlending(bool enable) {
 	_alphaBlending = enable;
 }
 
-#ifndef USE_GLES2
+#if defined(USE_OPENGL_GAME)
 
 FixedSurfaceRenderer::~FixedSurfaceRenderer() {
 }
@@ -145,7 +145,7 @@ void FixedSurfaceRenderer::restorePreviousState() {
 
 #endif
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 ShaderSurfaceRenderer::ShaderSurfaceRenderer() {
 	const GLfloat vertices[] = {
diff --git a/graphics/opengl/surfacerenderer.h b/graphics/opengl/surfacerenderer.h
index 4b9f06cdc4..122cf3ca9a 100644
--- a/graphics/opengl/surfacerenderer.h
+++ b/graphics/opengl/surfacerenderer.h
@@ -77,7 +77,7 @@ protected:
 	bool _alphaBlending;
 };
 
-#ifndef USE_GLES2
+#if defined(USE_OPENGL_GAME)
 
 class FixedSurfaceRenderer : public SurfaceRenderer {
 public:
@@ -91,7 +91,7 @@ public:
 
 #endif
 
-#if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_SHADERS)
 
 class ShaderSurfaceRenderer : public SurfaceRenderer {
 public:
diff --git a/graphics/opengl/texture.cpp b/graphics/opengl/texture.cpp
index 098c5a152f..f1efec5379 100644
--- a/graphics/opengl/texture.cpp
+++ b/graphics/opengl/texture.cpp
@@ -22,7 +22,7 @@
 
 #include "common/textconsole.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/texture.h"
 #include "graphics/opengl/context.h"
diff --git a/graphics/opengl/texture.h b/graphics/opengl/texture.h
index 4d41711c39..43224ca3ec 100644
--- a/graphics/opengl/texture.h
+++ b/graphics/opengl/texture.h
@@ -27,7 +27,7 @@
 
 #include "graphics/surface.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 namespace OpenGL {
 
diff --git a/graphics/opengl/tiledsurface.cpp b/graphics/opengl/tiledsurface.cpp
index 08af4671e6..f38ada184c 100644
--- a/graphics/opengl/tiledsurface.cpp
+++ b/graphics/opengl/tiledsurface.cpp
@@ -22,7 +22,7 @@
 
 #include "common/textconsole.h"
 
-#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)
+#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)
 
 #include "graphics/opengl/tiledsurface.h"
 




More information about the Scummvm-git-logs mailing list