Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Don't add the OpenGL renderers for drivers that don't support OpenGL

  • Loading branch information
slouken committed Nov 18, 2009
1 parent e470c6c commit bccd3b313c79e9f8a9238374849cc58cf6da1353
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/video/SDL_video.c
@@ -256,13 +256,14 @@ SDL_VideoInit(const char *driver_name, Uint32 flags)
}
/* 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);
}

0 comments on commit bccd3b3

Please sign in to comment.