]> git.cworth.org Git - fips/blobdiff - glwrap.c
Fix glwrap.c to workaround 'const' changes in OpenGL headers.
[fips] / glwrap.c
index 3a789fc131e0c693c398386b8f6f152038cfda35..c37bae3a16ab1b63ad1883ed5f6c46fdf4def4c8 100644 (file)
--- a/glwrap.c
+++ b/glwrap.c
 
 #include "glwrap.h"
 
+/* The prototypes for some OpenGL functions changed at one point from:
+ *
+ *     const void* *indices
+ * to:
+ *     const void* const coist *indices
+ *
+ * This makes it difficult for us to provide an implementation of
+ * these functions that is consistent with the locally-available gl.h
+ * since we don't know if the extra const will be present or not.
+ *
+ * To workaround this problem, we simply #define away const altogether
+ * before including gl.h.
+ *
+ * Kudos to Keith Packard for suggesting this kludge.
+ */
+#define const
+
 #define GL_GLEXT_PROTOTYPES
 #include <GL/gl.h>