Skip to content

Commit

Permalink
OpenGL: Require at least version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1F9F1 committed Mar 13, 2024
1 parent 892316d commit 4e9851a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion code/midtown/agigl/glpipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,19 @@ i32 agiGLPipeline::BeginGfx()
}

if (context == nullptr)
Quitf("Failed to create OpenGL context: %s", SDL_GetError());
{
Errorf("Failed to create OpenGL context: %s", SDL_GetError());
return AGI_ERROR_NO_DEVICE;
}

gl_context_ = arnew agiGLContext(window_, context, debug_level);

if (!gl_context_->HasVersion(120))
{
Errorf("Unsupported OpenGL version");
return AGI_ERROR_UNSUPPORTED;
}

SDL_GL_GetDrawableSize(window_, &horz_res_, &vert_res_);

Displayf("Window Resolution: %u x %u", horz_res_, vert_res_);
Expand Down

0 comments on commit 4e9851a

Please sign in to comment.