#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
#ifdef _WIN32
-#include <GL/wglext.h>
+#include "glext/wglext.h"
#define GLAPIENTRY __stdcall
#else /* !_WIN32 */
#include <GL/glx.h>
-#include <GL/glext.h>
+#include "glext/glxext.h"
/* Prevent collision with Trace::Bool */
#undef Bool