comparison 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
comparison
equal deleted inserted replaced
2244:5234868559fa 2245:989fb86ad1ec
2564 return -1; 2564 return -1;
2565 } 2565 }
2566 if (!context) { 2566 if (!context) {
2567 window = NULL; 2567 window = NULL;
2568 } 2568 }
2569 if (window) {
2570 if (window->context == context) {
2571 return 0;
2572 }
2573 window->context = context;
2574 }
2569 return _this->GL_MakeCurrent(_this, window, context); 2575 return _this->GL_MakeCurrent(_this, window, context);
2570 } 2576 }
2571 2577
2572 int 2578 int
2573 SDL_GL_SetSwapInterval(int interval) 2579 SDL_GL_SetSwapInterval(int interval)