summaryrefslogtreecommitdiff
path: root/src/utils/sdlhelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/sdlhelper.cpp')
-rw-r--r--src/utils/sdlhelper.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp
index 19cffa0a6..b809fd76b 100644
--- a/src/utils/sdlhelper.cpp
+++ b/src/utils/sdlhelper.cpp
@@ -140,6 +140,16 @@ void *SDL::createGLContext(SDL_Surface *const window A_UNUSED,
}
return context;
}
+
+void SDL::makeCurrentContext(void *const context)
+{
+ SDL_SysWMinfo info;
+ SDL_VERSION(&info.version);
+ SDL_GetWMInfo(&info);
+ GlxHelper::makeCurrent(info.info.x11.window,
+ info.info.x11.display,
+ context);
+}
#else
void *SDL::createGLContext(SDL_Surface *const window A_UNUSED,
const int major A_UNUSED,
@@ -147,6 +157,10 @@ void *SDL::createGLContext(SDL_Surface *const window A_UNUSED,
{
return nullptr;
}
+
+void SDL::makeCurrentContext(void *const context A_UNUSED)
+{
+}
#endif
#endif // USE_SDL2