X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glwrap.c;h=42eaa80e2766bc8261f85402564cbf2343734f48;hb=de8d00c71c256ab967ece877050b5dbffe66b19d;hp=22d48089afd7de7b803664c0097a6a4923cfdf5e;hpb=f1f4fb86c140a5219fc0697d1bc63720453bd72a;p=fips diff --git a/glwrap.c b/glwrap.c index 22d4808..42eaa80 100644 --- a/glwrap.c +++ b/glwrap.c @@ -45,7 +45,14 @@ #include "glwrap.h" -#include "metrics.h" +#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. * @@ -66,17 +73,17 @@ static void *gl_handle; /* Switch metrics operation persistently, (until next SWITCH) */ #define SWITCH_METRICS_OP(op) \ - metrics_counter_stop (); \ - metrics_set_current_op (op); \ - metrics_counter_start (); + context_counter_stop (); \ + context_set_current_op (op); \ + context_counter_start (); /* Switch metrics operation temporarily, see RESTORE_METRICS_OP */ #define SAVE_THEN_SWITCH_METRICS_OP(op) \ - metrics_op_t save = metrics_get_current_op (); \ + metrics_op_t save = context_get_current_op (); \ 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