From 79edc7574c353a7ae8d2455ecc3a94aa956b3c8e Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Fri, 8 Nov 2013 11:16:27 -0800 Subject: [PATCH] Allow fips to compile with OpenGL without GLfixed The Mesa 9.1 releases don't include the GLfixed datatype, so fips was failing to compile aginst those versions of Mesa, (since it was trying to add wrappers using the GLfixed datatype). But since the underlying functions don't exist in libGL.so, fips doesn't need the wrappers anyway. In this commit, we key off of the GL_GLEXT_VERSION macro from glext.h to decide whether or not to include these newer wrappers. This fixes compilation of fips on Mesa 9.1. --- glwrap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/glwrap.c b/glwrap.c index 39a784f..4b865f5 100644 --- a/glwrap.c +++ b/glwrap.c @@ -47,6 +47,13 @@ #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 @@ -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 -- 2.43.0