Skip to content

Commit

Permalink
glsl.cpp: disable GLU on Win32
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Dec 18, 2021
1 parent 90e5cd8 commit b1840be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions IOSupport/glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
#if 1
#include <glad.h>
#ifdef __APPLE__
#define HAVE_GLU 1
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
// https://github.com/NatronGitHub/openfx-io/issues/4#issuecomment-997284560
#undef HAVE_GLU
#endif
#if HAVE_GLU
#ifdef __APPLE__
#include <OpenGL/glu.h>
#else
#include <GL/glu.h>
#endif
#endif
#else
#ifdef __APPLE__

Expand Down Expand Up @@ -47,7 +55,11 @@ bool GetGLError(std::string & error)
const GLenum glErr = glGetError();
if(glErr!=GL_NO_ERROR)
{
#if HAVE_GLU
error = (const char*)gluErrorString(glErr);
#else
error = "OpenGL Error";
#endif
return true;
}
return false;
Expand Down

0 comments on commit b1840be

Please sign in to comment.