Update StarRenderer_opengl.cpp
This commit is contained in:
parent
a5f42ce40a
commit
db836d0ca4
@ -90,8 +90,9 @@ static void GLAPIENTRY GlMessageCallback(GLenum, GLenum type, GLuint, GLenum, GL
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
OpenGlRenderer::OpenGlRenderer() {
|
OpenGlRenderer::OpenGlRenderer() {
|
||||||
if (glewInit() != GLEW_OK)
|
auto result = glewInit();
|
||||||
throw RendererException("Could not initialize GLEW");
|
if (result != GLEW_OK)
|
||||||
|
throw RendererException::format("Could not initialize GLEW: {}", (char*)glewGetErrorString(result));
|
||||||
|
|
||||||
if (!GLEW_VERSION_2_0)
|
if (!GLEW_VERSION_2_0)
|
||||||
throw RendererException("OpenGL 2.0 not available!");
|
throw RendererException("OpenGL 2.0 not available!");
|
||||||
|
Loading…
Reference in New Issue
Block a user