diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-02 19:33:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-02 19:33:01 +0300 |
commit | eda234f5e156d376541044b351fd2e1e766700a3 (patch) | |
tree | 56ef425beb88fe84c280dea3a3ddeef676553589 /src/utils/sdlhelper.cpp | |
parent | 5ce62dae5b3848833765a19296ffd9fd7e9721d8 (diff) | |
download | manaverse-eda234f5e156d376541044b351fd2e1e766700a3.tar.gz manaverse-eda234f5e156d376541044b351fd2e1e766700a3.tar.bz2 manaverse-eda234f5e156d376541044b351fd2e1e766700a3.tar.xz manaverse-eda234f5e156d376541044b351fd2e1e766700a3.zip |
Fix resize in modernopengl with own context in SDL1.2 build.
Diffstat (limited to 'src/utils/sdlhelper.cpp')
-rw-r--r-- | src/utils/sdlhelper.cpp | 14 |
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 |