Put OpenGL in 'forward-compatible' mode

Disables deprecated functionality
This commit is contained in:
Clownacy 2019-07-31 23:07:45 +00:00
parent 4769397c7a
commit 90ffbacd29

View file

@ -172,6 +172,7 @@ static GLuint CompileShader(const char *vertex_shader_source, const char *fragme
SDL_Window* Backend_CreateWindow(const char *title, int width, int height) SDL_Window* Backend_CreateWindow(const char *title, int width, int height)
{ {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); 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_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);