comparison src/video/SDL_video.c @ 3450:173199bce642

Don't add the OpenGL renderers for drivers that don't support OpenGL
author Sam Lantinga <slouken@libsdl.org>
date Wed, 18 Nov 2009 09:17:29 +0000
parents bc27e1fdd3a7
children e77a69aae239
comparison
equal deleted inserted replaced
3449:7bd010656baf 3450:173199bce642
254 SDL_VideoQuit(); 254 SDL_VideoQuit();
255 return (-1); 255 return (-1);
256 } 256 }
257 /* The software renderer is always available */ 257 /* The software renderer is always available */
258 for (i = 0; i < _this->num_displays; ++i) { 258 for (i = 0; i < _this->num_displays; ++i) {
259 if (_this->GL_CreateContext) {
259 #if SDL_VIDEO_RENDER_OGL 260 #if SDL_VIDEO_RENDER_OGL
260 SDL_AddRenderDriver(i, &GL_RenderDriver); 261 SDL_AddRenderDriver(i, &GL_RenderDriver);
261 #endif 262 #endif
262
263 #if SDL_VIDEO_RENDER_OGL_ES 263 #if SDL_VIDEO_RENDER_OGL_ES
264 SDL_AddRenderDriver(i, &GL_ES_RenderDriver); 264 SDL_AddRenderDriver(i, &GL_ES_RenderDriver);
265 #endif 265 #endif
266 }
266 if (_this->displays[i].num_render_drivers > 0) { 267 if (_this->displays[i].num_render_drivers > 0) {
267 SDL_AddRenderDriver(i, &SW_RenderDriver); 268 SDL_AddRenderDriver(i, &SW_RenderDriver);
268 } 269 }
269 } 270 }
270 271