diff --git a/backends/graphics3d/opengl/framebuffer.cpp b/backends/graphics3d/opengl/framebuffer.cpp index ea23a64e235..f757a661f9a 100644 --- a/backends/graphics3d/opengl/framebuffer.cpp +++ b/backends/graphics3d/opengl/framebuffer.cpp @@ -22,7 +22,7 @@ #include "common/textconsole.h" #include "common/util.h" -#if (defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS)) && !defined(AMIGAOS) && !defined(__MORPHOS__) +#if defined(USE_OPENGL_GAME) || defined(USE_OPENGL_SHADERS) #include "backends/graphics3d/opengl/framebuffer.h" @@ -124,7 +124,7 @@ void FrameBuffer::detach() { glViewport(_prevStateViewport[0], _prevStateViewport[1], _prevStateViewport[2], _prevStateViewport[3]); } -#if !USE_FORCED_GLES2 && !defined(AMIGAOS) && !defined(__MORPHOS__) +#if !USE_FORCED_GLES2 MultiSampleFrameBuffer::MultiSampleFrameBuffer(uint width, uint height, int samples) : FrameBuffer(width,height) { if (!OpenGLContext.framebufferObjectMultisampleSupported) { @@ -186,7 +186,7 @@ void MultiSampleFrameBuffer::detach() { glViewport(_prevStateViewport[0], _prevStateViewport[1], _prevStateViewport[2], _prevStateViewport[3]); } -#endif // !USE_FORCED_GLES2 && !defined(AMIGAOS) && !defined(__MORPHOS__) +#endif // !USE_FORCED_GLES2 } // End of namespace OpenGL diff --git a/backends/graphics3d/opengl/framebuffer.h b/backends/graphics3d/opengl/framebuffer.h index 84189a8d4b7..976e59c8b09 100644 --- a/backends/graphics3d/opengl/framebuffer.h +++ b/backends/graphics3d/opengl/framebuffer.h @@ -34,17 +34,10 @@ class FrameBuffer : public TextureGL { public: FrameBuffer(uint width, uint height); FrameBuffer(GLuint texture_name, uint width, uint height, uint texture_width, uint texture_height); -#if defined(AMIGAOS) || defined(__MORPHOS__) - virtual ~FrameBuffer() {} - - void attach() {} - void detach() {} -#else virtual ~FrameBuffer(); virtual void attach(); virtual void detach(); -#endif protected: GLuint getFrameBufferName() const { return _frameBuffer; } @@ -56,7 +49,7 @@ private: GLint _prevStateViewport[4]; }; -#if !USE_FORCED_GLES2 && !defined(AMIGAOS) && !defined(__MORPHOS__) +#if !USE_FORCED_GLES2 class MultiSampleFrameBuffer : public FrameBuffer { public: MultiSampleFrameBuffer(uint width, uint height, int samples); diff --git a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp index aef35b94f70..fa827e0d709 100644 --- a/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp +++ b/backends/graphics3d/openglsdl/openglsdl-graphics3d.cpp @@ -356,13 +356,11 @@ void OpenGLSdlGraphics3dManager::createOrUpdateScreen() { _screenChangeCount++; -#if !defined(__amigaos4__) && !defined(__MORPHOS__) if (renderToFrameBuffer) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); _frameBuffer = createFramebuffer(_engineRequestedWidth, _engineRequestedHeight); _frameBuffer->attach(); } -#endif } Math::Rect2d OpenGLSdlGraphics3dManager::computeGameRect(bool renderToFrameBuffer, uint gameWidth, uint gameHeight, @@ -579,7 +577,6 @@ void OpenGLSdlGraphics3dManager::drawOverlay() { _surfaceRenderer->restorePreviousState(); } -#if !defined(__amigaos4__) && !defined(__MORPHOS__) OpenGL::FrameBuffer *OpenGLSdlGraphics3dManager::createFramebuffer(uint width, uint height) { #if !USE_FORCED_GLES2 if (_antialiasing && OpenGLContext.framebufferObjectMultisampleSupported) { @@ -590,7 +587,6 @@ OpenGL::FrameBuffer *OpenGLSdlGraphics3dManager::createFramebuffer(uint width, u return new OpenGL::FrameBuffer(width, height); } } -#endif void OpenGLSdlGraphics3dManager::updateScreen() { if (_frameBuffer) { diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 8f01465d373..d5b6b453240 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -328,7 +328,7 @@ void OSystem_SDL::detectOpenGLFeaturesSupport() { _oglType = OpenGL::kOGLContextGLES2; _supportsFrameBuffer = true; _supportsShaders = true; -#elif !defined(AMIGAOS) && !defined(__MORPHOS__) +#else // Spawn a 32x32 window off-screen with a GL context to test if framebuffers are supported #if SDL_VERSION_ATLEAST(2, 0, 0) SDL_Window *window = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 32, 32, SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN);