-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
First, thanks for maintaining this wonderful library.
I was trying to use SDL with ANGLE (the Google GLES one), and found that setting
SDL_SetHint(SDL_HINT_OPENGL_ES_DRIVER, "1");
leads to a false error in SDL_CreateWindow at
SDL/src/video/windows/SDL_windowsopengles.c
Line 111 in bd06538
SDL_assert(!_this->gl_config.driver_loaded); |
What the above hint does is prevent SDL from using the default driver, from NVidia for AMD, so it would use the GL Driver of ANGLE. Based on the name of variable--gl_config.driver_loaded--I think the problem is, this hint makes SDL think that there is no GL driver loaded, while having access to the ANGLE's driver.
Based on this observation, I can think of two fixes.
- A quick fix would be removing the SDL_assert line since this is not a condition that should be avoided based on the current situation.
- The other (perhaps more proper) one would be setting gl_config.driver_loaded to 1 or something else when SDL_HINT_OPENGL_ES_DRIVER is set to 1.
I'll submit a pull request based on option 1.
Attaching the code using SDL and ANGLE below.
hello_windows.cpp.txt