From 47739542f4ffba033bb70a8f58d1a056889f717e Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Mon, 18 Aug 2014 15:01:10 -0700 Subject: [PATCH] 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. --- glwrap.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 */ -- 2.43.0