[nostalgia/core/sdl] Set OpenGL version
This commit is contained in:
parent
e56fa3a531
commit
bfca2193bc
@ -35,6 +35,9 @@ ox::Error initGfx(Context *ctx) {
|
|||||||
if (id->window == nullptr) {
|
if (id->window == nullptr) {
|
||||||
return OxError(1, SDL_GetError());
|
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);
|
id->renderer = SDL_GL_CreateContext(id->window);
|
||||||
if (id->renderer == nullptr) {
|
if (id->renderer == nullptr) {
|
||||||
return OxError(1, SDL_GetError());
|
return OxError(1, SDL_GetError());
|
||||||
|
Loading…
Reference in New Issue
Block a user