]> git.cworth.org Git - apitrace/blobdiff - glimports.hpp
Get occlusion query getters reference the corrent size function.
[apitrace] / glimports.hpp
index e8d2c5c6036f86e06fe291090a8ac84f6e2e90c0..5277a0aabd2cc6871f0bc253e28a7dd571563bcc 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef _GLIMPORTS_HPP_
 #define _GLIMPORTS_HPP_
 
-#ifdef WIN32
+#ifdef _WIN32
 
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN 1
 
 #include <windows.h>
 
-#else /* !WIN32 */
+#else /* !_WIN32 */
 
 #include <X11/Xlib.h>
 
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
+
+// Prevent including system's glext.h
+#define __glext_h_
 
 #include <GL/gl.h>
 
-#include <GL/glext.h>
+#undef __glext_h_
+
+#include "glext/glext.h"
 
 #ifndef GL_TEXTURE_INDEX_SIZE_EXT
 #define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED
 #endif
 
-#ifdef WIN32
+#ifdef _WIN32
 
-#include <GL/wglext.h>
+#include "glext/wglext.h"
 
 #define GLAPIENTRY __stdcall
 
@@ -67,6 +72,7 @@
 
 #ifdef __MINGW32__
 
+extern "C"
 typedef struct _WGLSWAP
 {
     HDC hdc;
@@ -77,11 +83,14 @@ typedef struct _WGLSWAP
 
 #endif /* __MINGW32__ */
 
-#else /* !WIN32 */
+#else /* !_WIN32 */
 
 #include <GL/glx.h>
-#include <GL/glext.h>
+#include "glext/glxext.h"
+
+/* Prevent collision with Trace::Bool */
+#undef Bool
 
-#endif /* !WIN32 */
+#endif /* !_WIN32 */
 
 #endif /* _GLIMPORTS_HPP_ */