GTK: Set GL attributes before creating the SDL window
This apparently helps on the proprietary Nvidia driver. Thanks @thesourcehim for debugging that! Fixes #399. Fixes #400.
This commit is contained in:
parent
91f6e4a9ef
commit
6e35440436
|
@ -49,10 +49,6 @@ bool deinit_sdl_3Demu(void)
|
|||
|
||||
bool init_sdl_3Demu(void)
|
||||
{
|
||||
win = SDL_CreateWindow(NULL, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 256, 192, SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN);
|
||||
if (!win)
|
||||
return false;
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
|
||||
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
|
||||
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
|
||||
|
@ -64,6 +60,10 @@ bool init_sdl_3Demu(void)
|
|||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
|
||||
|
||||
win = SDL_CreateWindow(NULL, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 256, 192, SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN);
|
||||
if (!win)
|
||||
return false;
|
||||
|
||||
ctx = SDL_GL_CreateContext(win);
|
||||
if (!ctx)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue