| Summary: | "ERROR: Failed loading eglChooseConfig" message when using opengles2 with windows+ANGLE | ||
|---|---|---|---|
| Product: | SDL | Reporter: | gdecarp |
| Component: | video | Assignee: | Gabriel Jacobo <gabomdq> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.3 | ||
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
Gabriel, can you verify that this is the correct fix? Thanks! Fixed, thanks! |
DESCRIPTION: When running the opengles2 driver on windows with ANGLE (and using at an error+ logging priority), i get the following dumped message when calling SDL_CreateWindow() with SDL_WINDOW_OPENGL enabled (and at a later point when i try to use SDL_CreateWindow() without SDL_WINDOW_OPENGL): "ERROR: Failed loading eglChooseConfig: The specified procedure could not be found." MINIMAL REPRO CODE (again, on windows using ANGLE): SDL_Init(SDL_INIT_VIDEO); SDL_SetHint(SDL_HINT_RENDER_DRIVER, "opengles2"); SDL_GL_SetAttribute(SDL_GL_CONTEXT_EGL, 1); SDL_LogSetAllPriority(SDL_LOG_PRIORITY_ERROR); SDL_CreateWindow("Window", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); FIX: The issue is caused by the call to SDL_LoadFunction() with an invalid parameter (a null dll_handle) in SDL_EGL_LoadLibrary() in SDL_egl.c. One possible fix is to change line 185 in SDL_egl.c from: if (SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) { to: if (dll_handle == NULL || SDL_LoadFunction(dll_handle, "eglChooseConfig") == NULL) {