diff --git a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp index 3f4810470..0a645a545 100644 --- a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp +++ b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp @@ -31,7 +31,6 @@ #include "Magnum/ImageView.h" #include "Magnum/Math/ConfigurationValue.h" -#include "Magnum/GL/DefaultFramebuffer.h" #include "Magnum/Platform/Sdl2Application.h" #include "Magnum/Trade/AbstractImporter.h" #include "Magnum/Trade/ImageData.h" @@ -48,6 +47,10 @@ #pragma clang diagnostic pop #endif +#ifdef MAGNUM_TARGET_GL +#include "Magnum/GL/DefaultFramebuffer.h" +#endif + namespace Magnum { namespace Platform { namespace Test { namespace { struct Sdl2ApplicationTest: Platform::Application { @@ -69,7 +72,9 @@ struct Sdl2ApplicationTest: Platform::Application { void drawEvent() override { Debug{} << "draw event"; + #ifdef MAGNUM_TARGET_GL GL::defaultFramebuffer.clear(GL::FramebufferClear::Color); + #endif swapBuffers(); }