Demos (master): wglinfo: Don't rely on GL/glext.h

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed May 28 20:38:00 UTC 2014


Module: Demos
Branch: master
Commit: 57c36884cbcb0d6197d3feb001f53be0789f59b9
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=57c36884cbcb0d6197d3feb001f53be0789f59b9

Author: José Fonseca <jose.r.fonseca at gmail.com>
Date:   Wed May 28 21:35:17 2014 +0100

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.

---

 src/xdemos/glinfo_common.h |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/xdemos/glinfo_common.h b/src/xdemos/glinfo_common.h
index 61d1643..d0daf4d 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);




More information about the mesa-commit mailing list