diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index a9d04cc28..703594aea 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -1876,7 +1876,9 @@ int SDL_GL_UnbindTexture(SDL_Texture *texture) CHECK_TEXTURE_MAGIC(texture, -1); renderer = texture->renderer; - if (renderer && renderer->GL_UnbindTexture) { + if (texture->native) { + return SDL_GL_UnbindTexture(texture->native); + } else if (renderer && renderer->GL_UnbindTexture) { return renderer->GL_UnbindTexture(renderer, texture); }