summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2014-05-28 21:35:17 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2014-05-28 21:37:25 +0100
commit57c36884cbcb0d6197d3feb001f53be0789f59b9 (patch)
treece5e85b859b9a54c0607fe63926c7e14d47ecd26
parent1307dc265f6777a5f5bd6cd228527602ad7d8425 (diff)
wglinfo: Don't rely on GL/glext.h
GL/glext.h is not commonly available when building on Windows (though recent MinGW versions seem to have it.) So get the defines from GL/glew.h to avoid introducing a new build Trivial. Verified glxinfo and wglinfo build correctly.
-rw-r--r--src/xdemos/glinfo_common.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xdemos/glinfo_common.h b/src/xdemos/glinfo_common.h
index 61d16436..d0daf4dd 100644
--- a/src/xdemos/glinfo_common.h
+++ b/src/xdemos/glinfo_common.h
@@ -28,13 +28,13 @@
#define GLINFO_COMMON_H
-/**
- * Note: the gl.h header shipped with MinGW doesn't include glext.h so we
- * include it here. And the PFNGL typedefs are hit and miss so we define
- * our own here.
- */
+#ifdef _WIN32
+/* GL/glext.h is not commonly available on Windows. */
+#include <GL/glew.h>
+#else
#include <GL/gl.h>
#include <GL/glext.h>
+#endif
typedef void (APIENTRY * GETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
typedef const GLubyte *(APIENTRY * GETSTRINGIPROC) (GLenum name, GLuint index);