From 29b1af417ae1a24b938ed24a4cbfd8639ab036c1 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Tue, 15 Feb 2011 10:21:17 -0600 Subject: [PATCH] Add support for #define GLEW_NO_GLU, contributed by Stefan Eilemann --- auto/src/glew_head.h | 10 ++++++---- src/visualinfo.c | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h index 9f2cf2f..26b8808 100644 --- a/auto/src/glew_head.h +++ b/auto/src/glew_head.h @@ -1080,10 +1080,12 @@ GLAPI void GLAPIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei heigh /* ---------------------------------- GLU ---------------------------------- */ +#ifndef GLEW_NO_GLU /* this is where we can safely include GLU */ -#if defined(__APPLE__) && defined(__MACH__) -#include -#else -#include +# if defined(__APPLE__) && defined(__MACH__) +# include +# else +# include +# endif #endif diff --git a/src/visualinfo.c b/src/visualinfo.c index 177f765..52839c5 100644 --- a/src/visualinfo.c +++ b/src/visualinfo.c @@ -161,10 +161,13 @@ main (int argc, char** argv) fprintf(file, "OpenGL version string: %s\n", glGetString(GL_VERSION)); fprintf(file, "OpenGL extensions (GL_): \n"); PrintExtensions((char*)glGetString(GL_EXTENSIONS)); + +#ifndef GLEW_NO_GLU /* GLU extensions */ fprintf(file, "GLU version string: %s\n", gluGetString(GLU_VERSION)); fprintf(file, "GLU extensions (GLU_): \n"); PrintExtensions((char*)gluGetString(GLU_EXTENSIONS)); +#endif /* ---------------------------------------------------------------------- */ /* extensions string */