diff --git a/code/midtown/agigl/glpipe.cpp b/code/midtown/agigl/glpipe.cpp index e708a035..e6f02f33 100644 --- a/code/midtown/agigl/glpipe.cpp +++ b/code/midtown/agigl/glpipe.cpp @@ -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_);