Don't add the OpenGL renderers for drivers that don't support OpenGL
authorSam Lantinga <slouken@libsdl.org>
Wed, 18 Nov 2009 09:17:29 +0000
changeset 3450173199bce642
parent 3449 7bd010656baf
child 3451 a65f7b3a2524
Don't add the OpenGL renderers for drivers that don't support OpenGL
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Wed Nov 18 09:07:13 2009 +0000
     1.2 +++ b/src/video/SDL_video.c	Wed Nov 18 09:17:29 2009 +0000
     1.3 @@ -256,13 +256,14 @@
     1.4      }
     1.5      /* The software renderer is always available */
     1.6      for (i = 0; i < _this->num_displays; ++i) {
     1.7 +        if (_this->GL_CreateContext) {
     1.8  #if SDL_VIDEO_RENDER_OGL
     1.9 -        SDL_AddRenderDriver(i, &GL_RenderDriver);
    1.10 +            SDL_AddRenderDriver(i, &GL_RenderDriver);
    1.11  #endif
    1.12 -
    1.13  #if SDL_VIDEO_RENDER_OGL_ES
    1.14 -        SDL_AddRenderDriver(i, &GL_ES_RenderDriver);
    1.15 +            SDL_AddRenderDriver(i, &GL_ES_RenderDriver);
    1.16  #endif
    1.17 +        }
    1.18          if (_this->displays[i].num_render_drivers > 0) {
    1.19              SDL_AddRenderDriver(i, &SW_RenderDriver);
    1.20          }