changeset 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 7bd010656baf
children a65f7b3a2524
files src/video/SDL_video.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/SDL_video.c	Wed Nov 18 09:07:13 2009 +0000
+++ b/src/video/SDL_video.c	Wed Nov 18 09:17:29 2009 +0000
@@ -256,13 +256,14 @@
     }
     /* The software renderer is always available */
     for (i = 0; i < _this->num_displays; ++i) {
+        if (_this->GL_CreateContext) {
 #if SDL_VIDEO_RENDER_OGL
-        SDL_AddRenderDriver(i, &GL_RenderDriver);
+            SDL_AddRenderDriver(i, &GL_RenderDriver);
 #endif
-
 #if SDL_VIDEO_RENDER_OGL_ES
-        SDL_AddRenderDriver(i, &GL_ES_RenderDriver);
+            SDL_AddRenderDriver(i, &GL_ES_RenderDriver);
 #endif
+        }
         if (_this->displays[i].num_render_drivers > 0) {
             SDL_AddRenderDriver(i, &SW_RenderDriver);
         }