]> git.cworth.org Git - fips/commitdiff
Fix compilation due to changed signature of glClearNamedBufferSubDataEXT.
authorMark Janes <mark.a.janes@intel.com>
Mon, 18 Aug 2014 22:01:10 +0000 (15:01 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 19 Aug 2014 23:17:27 +0000 (16:17 -0700)
As of GL_GLEXT_VERSION 20131212, the function signature of
glClearNamedBufferSubDataEXT changed, (different argument order). By
keying off of the version, we can support compilation with either an
old or a new version of glext.h.

glwrap.c

index 42eaa80e2766bc8261f85402564cbf2343734f48..76d9ef9bd360fdfa85ecd6e0c14641a3dc380a0e 100644 (file)
--- a/glwrap.c
+++ b/glwrap.c
@@ -558,6 +558,7 @@ glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format,
        RESTORE_METRICS_OP ();
 }
 
+#if GL_GLEXT_VERSION < 20131212
 void
 glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat,
                              GLenum format, GLenum type, GLsizeiptr offset,
@@ -570,6 +571,21 @@ glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat,
 
        RESTORE_METRICS_OP ();
 }
+#else
+void
+glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, 
+                              GLsizeiptr offset, GLsizeiptr size, 
+                              GLenum format, GLenum type, 
+                              const void *data)
+{
+       SAVE_THEN_SWITCH_METRICS_OP (METRICS_OP_CLEAR_BUFFER_DATA);
+
+       GLWRAP_DEFER (glClearNamedBufferSubDataEXT, buffer, internalformat, 
+                  offset, size, format, type, data);
+
+       RESTORE_METRICS_OP ();
+}
+#endif
 
 /* METRICS_OP_CLEAR_TEX_IMAGE */