Take advantage of GL_ARB_texture_non_power_of_two when it's available

This commit is contained in:
Sam Lantinga 2014-08-14 21:31:50 -07:00
parent 2c1faa40eb
commit c6a2382c66
2 changed files with 18 additions and 7 deletions

View file

@ -376,8 +376,9 @@ GL_CreateShaderContext()
return NULL;
}
if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle")
|| SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) {
if (!SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two") &&
(SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle") ||
SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle"))) {
ctx->GL_ARB_texture_rectangle_supported = SDL_TRUE;
}