Allow SDL hints to override OpenGL extension availability

This commit is contained in:
Sam Lantinga 2024-08-03 10:56:16 -07:00
parent a97dadf779
commit 95adcc522f
3 changed files with 5 additions and 5 deletions

View file

@ -1729,7 +1729,7 @@ static int GL_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL_Pro
data->glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
}
hint = SDL_getenv("GL_ARB_texture_non_power_of_two");
hint = SDL_GetHint("GL_ARB_texture_non_power_of_two");
if (!hint || *hint != '0') {
SDL_bool isGL2 = SDL_FALSE;
const char *verstr = (const char *)data->glGetString(GL_VERSION);