]> git.cworth.org Git - fips/blobdiff - glwrap.c
Re-enable termination message at exit.
[fips] / glwrap.c
index 39a784fb2088ce592e08fb54fb6659f3c9419884..76d9ef9bd360fdfa85ecd6e0c14641a3dc380a0e 100644 (file)
--- a/glwrap.c
+++ b/glwrap.c
 
 #include "context.h"
 
+/* The first appearance of the GLfixed datatype in Mesa was with
+ * glext.h of version 20130624. So we'll assume that any older glext.h
+ * cannot have any function accepting a GLfixed parameter. */
+#if GL_GLEXT_VERSION >= 20130624
+#define HAVE_GLFIXED 1
+#endif
+
 /* As of glext.h version 20131008 some types changed.
  *
  * I have no idea why some internalFormats changed from GLenum to
@@ -76,7 +83,7 @@ static void *gl_handle;
        SWITCH_METRICS_OP (op);
 
 /* Switch back to metrics operation saved by SAVE_THEN_SWITCH_METRICS_OP */
-#define RESTORE_METRICS_OP(op)                         \
+#define RESTORE_METRICS_OP()                           \
        SWITCH_METRICS_OP (save);
 
 void
@@ -177,6 +184,7 @@ glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
        RESTORE_METRICS_OP ();
 }
 
+#if HAVE_GLFIXED
 void
 glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
 {
@@ -186,6 +194,7 @@ glClearAccumxOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
 
        RESTORE_METRICS_OP ();
 }
+#endif
 
 /* METRICS_OP_BUFFER_DATA */
 void
@@ -418,6 +427,7 @@ glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig,
        RESTORE_METRICS_OP ();
 }
 
+#if HAVE_GLFIXED
 void
 glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig,
              GLfixed xmove, GLfixed ymove, const GLubyte *bitmap)
@@ -429,6 +439,7 @@ glBitmapxOES (GLsizei width, GLsizei height, GLfixed xorig, GLfixed yorig,
 
        RESTORE_METRICS_OP ();
 }
+#endif
 
 /* METRICS_OP_BLIT_FRAMEBUFFER */
 void
@@ -547,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,
@@ -559,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 */