diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp index 60eb64ee8eb..4b6c72d3a2d 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(SDL_BACKEND) +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) #include "backends/graphics3d/openglsdl/openglsdl-graphics3d.h" diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h index beaf07aa838..c36d0b3e1dc 100644 --- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.h +++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.h @@ -25,6 +25,8 @@ #include "backends/graphics3d/sdl/sdl-graphics3d.h" +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) + namespace OpenGL { class FrameBuffer; class SurfaceRenderer; @@ -182,4 +184,6 @@ protected: TransactionMode _transactionMode; }; +#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) + #endif diff --git a/backends/module.mk b/backends/module.mk index 5e135ca51f2..a7d690b8a4f 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -143,6 +143,7 @@ MODULE_OBJS += \ graphics/sdl/sdl-graphics.o \ graphics/surfacesdl/surfacesdl-graphics.o \ graphics3d/sdl/sdl-graphics3d.o \ + graphics3d/openglsdl/openglsdl-graphics3d.o \ mixer/sdl/sdl-mixer.o \ mutex/sdl/sdl-mutex.o \ plugins/sdl/sdl-provider.o \ @@ -159,11 +160,6 @@ MODULE_OBJS += \ graphics/openglsdl/openglsdl-graphics.o endif -ifdef USE_OPENGL_GAME -MODULE_OBJS += \ - graphics3d/openglsdl/openglsdl-graphics3d.o -endif - ifdef USE_DISCORD MODULE_OBJS += \ presence/discord/discord.o diff --git a/graphics/opengl/framebuffer.h b/graphics/opengl/framebuffer.h index 0f8383b1c71..91761a061d3 100644 --- a/graphics/opengl/framebuffer.h +++ b/graphics/opengl/framebuffer.h @@ -26,6 +26,8 @@ #include "graphics/opengl/system_headers.h" #include "graphics/opengl/texture.h" +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) + namespace OpenGL { class FrameBuffer : public TextureGL { @@ -73,4 +75,6 @@ private: } // End of namespace OpenGL +#endif // defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) + #endif diff --git a/graphics/opengl/texture.h b/graphics/opengl/texture.h index b2fa9f89cca..4d41711c399 100644 --- a/graphics/opengl/texture.h +++ b/graphics/opengl/texture.h @@ -27,7 +27,7 @@ #include "graphics/surface.h" -#ifdef USE_OPENGL_GAME +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) || defined(USE_GLES2) namespace OpenGL {