Skip to content

Commit

Permalink
Fix for Wayland (#1577)
Browse files Browse the repository at this point in the history
* Fix for Wayland. Doesn't require special version of GLEW

Signed-off-by: Matthew J. Milner <[email protected]>
  • Loading branch information
matterhorn103 authored Jan 18, 2024
1 parent d6acfd6 commit ce5cdea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion avogadro/rendering/glrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ GLRenderer::~GLRenderer()
void GLRenderer::initialize()
{
GLenum result = glewInit();
m_valid = (result == GLEW_OK);
m_valid = (result == GLEW_OK || result == GLEW_ERROR_NO_GLX_DISPLAY);
if (!m_valid) {
m_error += "GLEW could not be initialized.\n";
return;
Expand Down
2 changes: 1 addition & 1 deletion avogadro/vtk/vtkAvogadroActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int vtkAvogadroActor::RenderOpaqueGeometry(vtkViewport *)
{
if (!m_initialized) {
GLenum result = glewInit();
if (result != GLEW_OK) {
if (result != GLEW_OK && result != GLEW_ERROR_NO_GLX_DISPLAY) {
cout << "Error, could not initialize GLEW." << endl;
return 0;
}
Expand Down

0 comments on commit ce5cdea

Please sign in to comment.