From eda234f5e156d376541044b351fd2e1e766700a3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Jul 2014 19:33:01 +0300 Subject: Fix resize in modernopengl with own context in SDL1.2 build. --- src/utils/sdlhelper.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/utils/sdlhelper.cpp') 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 -- cgit v1.2.3-70-g09d2