From bfca2193bc756fb6991c0b95f7c96337d62b3137 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 18 Mar 2021 19:06:21 -0500 Subject: [PATCH] [nostalgia/core/sdl] Set OpenGL version --- src/nostalgia/core/sdl/gfx.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nostalgia/core/sdl/gfx.cpp b/src/nostalgia/core/sdl/gfx.cpp index c8847781d..0b8581cd9 100644 --- a/src/nostalgia/core/sdl/gfx.cpp +++ b/src/nostalgia/core/sdl/gfx.cpp @@ -35,6 +35,9 @@ ox::Error initGfx(Context *ctx) { if (id->window == nullptr) { return OxError(1, SDL_GetError()); } + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2); id->renderer = SDL_GL_CreateContext(id->window); if (id->renderer == nullptr) { return OxError(1, SDL_GetError());