Skip to content

Commit

Permalink
Changed to simpler fix that doesn't require special version of GLEW
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew J. Milner <matterhorn103@proton.me>
  • Loading branch information
matterhorn103 committed Jan 18, 2024
1 parent cc77f32 commit e0fd558
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions avogadro/rendering/glrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ GLRenderer::~GLRenderer()

void GLRenderer::initialize()
{
GLenum result = glewContextInit();
m_valid = (result == GLEW_OK);
GLenum result = glewInit();
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
4 changes: 2 additions & 2 deletions avogadro/vtk/vtkAvogadroActor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ vtkAvogadroActor::~vtkAvogadroActor()
int vtkAvogadroActor::RenderOpaqueGeometry(vtkViewport *)
{
if (!m_initialized) {
GLenum result = glewContextInit();
if (result != GLEW_OK) {
GLenum result = glewInit();
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 e0fd558

Please sign in to comment.