Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdl_glimp: update the error message when OpenGL is too old #1401

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions src/engine/sys/sdl_glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,6 +1753,10 @@ static rserr_t GLimp_StartDriverAndSetMode( int mode, bool fullscreen, bool bord

rserr_t err = GLimp_SetMode(mode, fullscreen, bordered);

const char* glRequirements =
"You need a graphics card with drivers supporting at least\n"
"OpenGL 3.2 or OpenGL 2.1 with EXT_framebuffer_object.";

switch ( err )
{
case rserr_t::RSERR_OK:
Expand All @@ -1768,21 +1772,13 @@ static rserr_t GLimp_StartDriverAndSetMode( int mode, bool fullscreen, bool bord
break;

case rserr_t::RSERR_MISSING_GL:
Sys::Error(
"OpenGL is not available.\n\n"
"You need a graphic card with drivers supporting\n"
"at least OpenGL 3.2 or OpenGL 2.1 with\n"
"ARB_half_float_vertex and EXT_framebuffer_object." );
Sys::Error( "OpenGL is not available.\n\n%s", glRequirements );

// Sys:Error calls OSExit() so the break and the return is unreachable.
break;

case rserr_t::RSERR_OLD_GL:
Sys::Error(
"OpenGL %d.%d is too old.\n\n"
"You need a graphic card with drivers supporting\n"
"at least OpenGL 3.2 or OpenGL 2.1 with\n"
"ARB_half_float_vertex and EXT_framebuffer_object." );
Sys::Error( "OpenGL %d.%d is too old.\n\n%s", glConfig2.glMajor, glConfig2.glMinor, glRequirements );

// Sys:Error calls OSExit() so the break and the return is unreachable.
break;
Expand Down