src/render/SDL_render.c
changeset 7318 46a5a6b8678e
parent 7240 39eb4958950a
child 7339 2d2fd56db9b7
     1.1 --- a/src/render/SDL_render.c	Mon Jun 24 22:06:50 2013 -0700
     1.2 +++ b/src/render/SDL_render.c	Tue Jun 25 20:21:31 2013 -0700
     1.3 @@ -1739,11 +1739,13 @@
     1.4  
     1.5      CHECK_TEXTURE_MAGIC(texture, -1);
     1.6      renderer = texture->renderer;
     1.7 -    if (renderer && renderer->GL_BindTexture) {
     1.8 +    if (texture->native) {
     1.9 +        return SDL_GL_BindTexture(texture->native, texw, texh);
    1.10 +    } else if (renderer && renderer->GL_BindTexture) {
    1.11          return renderer->GL_BindTexture(renderer, texture, texw, texh);
    1.12 +    } else {
    1.13 +        return SDL_Unsupported();
    1.14      }
    1.15 -
    1.16 -    return SDL_Unsupported();
    1.17  }
    1.18  
    1.19  int SDL_GL_UnbindTexture(SDL_Texture *texture)