Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-07-30 12:41:24 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-07-30 12:41:24 +1000
commita75703085ebf0c28e3dd089f4ddcd716177afa21 (patch)
tree9adc49af21a5423b1981cf379dfc57b5cd854d91 /source
parent0990379db81cb5abd6e4c0ca675fdee06c7b04c2 (diff)
Ignore GLEW wayland error (https://github.com/nigels-com/glew/issues/172)
Diffstat (limited to 'source')
-rw-r--r--source/application/StarRenderer_opengl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/application/StarRenderer_opengl.cpp b/source/application/StarRenderer_opengl.cpp
index 72d56b8..7ebcf4c 100644
--- a/source/application/StarRenderer_opengl.cpp
+++ b/source/application/StarRenderer_opengl.cpp
@@ -90,9 +90,9 @@ static void GLAPIENTRY GlMessageCallback(GLenum, GLenum type, GLuint, GLenum, GL
*/
OpenGlRenderer::OpenGlRenderer() {
- auto result = glewInit();
- if (result != GLEW_OK)
- throw RendererException::format("Could not initialize GLEW: {} - {}", result, (char*)glewGetErrorString(result));
+ auto glewResult = glewInit();
+ if (glewResult != GLEW_OK && glewResult != GLEW_ERROR_NO_GLX_DISPLAY)
+ throw RendererException::format("Could not initialize GLEW: {}", (char*)glewGetErrorString(glewResult));
if (!GLEW_VERSION_2_0)
throw RendererException("OpenGL 2.0 not available!");