Skip to content

Commit

Permalink
renderer/glimp: make error message about GLEW initialization failure …
Browse files Browse the repository at this point in the history
…more explicit
  • Loading branch information
illwieckz committed Jun 7, 2021
1 parent 69dd1ca commit c1b444c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/engine/sys/sdl_glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,19 @@ static rserr_t GLimp_SetMode( int mode, bool fullscreen, bool noborder )
if ( glewResult != GLEW_OK )
{
// glewInit failed, something is seriously wrong

GLimp_DestroyWindow();
Sys::Error( "GLimp_SetMode: could not load OpenGL subsystem: %s", glewGetErrorString( glewResult ) );

const char* profileName = GLimp_getProfileName( bestProfile );

Sys::Error( "GLEW initialization failed: %s.\n\n"
"Engine successfully created %d-bit GL %d.%d %d context,\n"
"This is a GLEW issue.",
glewGetErrorString( glewResult ),
bestColorBits,
bestMajor,
bestMinor,
profileName );
}
else
{
Expand Down

0 comments on commit c1b444c

Please sign in to comment.