From e3cd0da0dfac97581c4938602f1fc1f54af4424c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Wed, 14 Oct 2020 07:06:18 +0200 Subject: [PATCH] BACKENDS: Attempt to fix buildbot targets --- backends/platform/sdl/sdl.cpp | 12 ++++++------ configure | 2 +- graphics/opengl/framebuffer.cpp | 2 +- graphics/opengl/surfacerenderer.cpp | 2 +- graphics/opengl/texture.cpp | 3 +-- graphics/opengl/tiledsurface.cpp | 2 +- graphics/renderer.cpp | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 88a02d66996..80fb5155cec 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -49,11 +49,12 @@ #include "backends/mutex/sdl/sdl-mutex.h" #include "backends/timer/sdl/sdl-timer.h" #include "backends/graphics/surfacesdl/surfacesdl-graphics.h" +#include "backends/graphics3d/sdl/sdl-graphics3d.h" #ifdef USE_OPENGL #include "backends/graphics/openglsdl/openglsdl-graphics.h" #include "graphics/cursorman.h" #endif -#ifdef USE_OPENGL_GAME +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) #include "backends/graphics3d/openglsdl/openglsdl-graphics3d.h" #include "graphics/opengl/context.h" #endif @@ -305,7 +306,7 @@ void OSystem_SDL::initBackend() { } } -#ifdef USE_OPENGL_GAME +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) void OSystem_SDL::detectFramebufferSupport() { _capabilities.openGLFrameBuffer = false; #if defined(USE_GLES2) @@ -381,7 +382,7 @@ void OSystem_SDL::detectAntiAliasingSupport() { SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0); } -#endif // USE_OPENGL_GAME +#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) void OSystem_SDL::engineInit() { #if SDL_VERSION_ATLEAST(2, 0, 0) @@ -487,7 +488,7 @@ void OSystem_SDL::setWindowCaption(const char *caption) { _window->setWindowCaption(cap); } -#ifdef USE_OPENGL_GAME +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) Common::Array OSystem_SDL::getSupportedAntiAliasingLevels() const { return _capabilities.openGLAntiAliasLevels; } @@ -783,8 +784,7 @@ bool OSystem_SDL::setGraphicsMode(int mode, uint flags) { sdlGraphicsManager->deactivateManager(); delete sdlGraphicsManager; } - -#ifdef USE_OPENGL_GAME +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) if (!dynamic_cast(sdlGraphics3dManager)) { if (sdlGraphics3dManager) { sdlGraphics3dManager->deactivateManager(); diff --git a/configure b/configure index 6a6f2fc7a7e..fb59341b420 100755 --- a/configure +++ b/configure @@ -5418,7 +5418,6 @@ EOF for lib in "-lGLESv2" "-logles2"; do if cc_check_no_clean $DEFINES $OPENGL_CFLAGS $OPENGL_LIBS $lib then - _opengl_game=yes _opengles2=yes append_var OPENGL_LIBS "$lib" break @@ -5461,6 +5460,7 @@ fi # If 2d sdl gfx backend has no opengl we will not enable opengl in games due lack of gfx dynamic switch if test "$_opengl" = "no" ; then _opengl_game=no + _opengl_shaders=no _opengles2=no _glew=no fi diff --git a/graphics/opengl/framebuffer.cpp b/graphics/opengl/framebuffer.cpp index 939fc2a21f8..57becce922e 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(AMIGAOS) && !defined(__MORPHOS__) +#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)) && !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/surfacerenderer.cpp b/graphics/opengl/surfacerenderer.cpp index 060561b20fd..c5dd381a280 100644 --- a/graphics/opengl/surfacerenderer.cpp +++ b/graphics/opengl/surfacerenderer.cpp @@ -22,7 +22,7 @@ #include "common/scummsys.h" -#if defined(USE_OPENGL_GAME) +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) #include "graphics/opengl/surfacerenderer.h" diff --git a/graphics/opengl/texture.cpp b/graphics/opengl/texture.cpp index 0ea8d17cbef..098c5a152fd 100644 --- a/graphics/opengl/texture.cpp +++ b/graphics/opengl/texture.cpp @@ -22,12 +22,11 @@ #include "common/textconsole.h" -#if defined(USE_OPENGL_GAME) +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) #include "graphics/opengl/texture.h" #include "graphics/opengl/context.h" - namespace OpenGL { template diff --git a/graphics/opengl/tiledsurface.cpp b/graphics/opengl/tiledsurface.cpp index 9c711f2c3ce..08af4671e67 100644 --- a/graphics/opengl/tiledsurface.cpp +++ b/graphics/opengl/tiledsurface.cpp @@ -22,7 +22,7 @@ #include "common/textconsole.h" -#if defined(USE_OPENGL_GAME) +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) #include "graphics/opengl/tiledsurface.h" diff --git a/graphics/renderer.cpp b/graphics/renderer.cpp index 64f55a26355..f54b56de249 100644 --- a/graphics/renderer.cpp +++ b/graphics/renderer.cpp @@ -27,7 +27,7 @@ namespace Graphics { static const RendererTypeDescription rendererTypes[] = { -#if defined(USE_OPENGL_GAME) && !defined(USE_GLES2) +#if defined(USE_OPENGL_GAME) { "opengl", _s("OpenGL"), kRendererTypeOpenGL }, #endif #if defined(USE_OPENGL_SHADERS) || defined(USE_GLES2)