Mercurial > sdl-ios-xcode
diff src/video/SDL_video.c @ 2245:989fb86ad1ec
Optimization suggested by Ryan:
Don't set the same OpenGL context multiple times
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 15 Aug 2007 03:52:31 +0000 |
parents | 926294b2bb4e |
children | 340942cfda48 |
line wrap: on
line diff
--- a/src/video/SDL_video.c Wed Aug 15 03:50:49 2007 +0000 +++ b/src/video/SDL_video.c Wed Aug 15 03:52:31 2007 +0000 @@ -2566,6 +2566,12 @@ if (!context) { window = NULL; } + if (window) { + if (window->context == context) { + return 0; + } + window->context = context; + } return _this->GL_MakeCurrent(_this, window, context); }