t/sdl_test: sdl-test needs OpenGL4.5

sdl-test uses some OpenGL4.5 features, such as Texture Objects.

Currently, sdl-test is initialized with an OpenGL3.3 context, and with
a NVidia driver (version 535.98, on Linux), the call to those features
(glCreateTextures() being the first of them) segfaults.
This commit is contained in:
sdegrande 2023-08-31 16:36:13 +02:00 committed by Jakob Bornecrantz
parent 95b8a3b783
commit f290b6418d

View file

@ -32,8 +32,8 @@ sdl_create_window(struct sdl_program *sp)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 5);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);