From: Mark Janes Date: Mon, 18 Aug 2014 22:01:10 +0000 (-0700) Subject: Fix compilation due to changed signature of glClearNamedBufferSubDataEXT. X-Git-Url: https://git.cworth.org/git/fips/commitdiff/47739542f4ffba033bb70a8f58d1a056889f717e?p=fips;a=commitdiff_plain;h=47739542f4ffba033bb70a8f58d1a056889f717e Fix compilation due to changed signature of glClearNamedBufferSubDataEXT. 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. --- diff --git a/glwrap.c b/glwrap.c index 42eaa80..76d9ef9 100644 --- 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 */