From b36872446418f73a0d494fe193a38af10d14ba2d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 20 Jul 2015 13:08:26 +1000 Subject: Fix define issues w/ WITH_GL_PROFILE_COMPAT off This still fails to build, but at least fail where its supposed to (using unsupported API's). --- source/blender/editors/include/BIF_gl.h | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/include/BIF_gl.h') diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index 3b7d7bac44f..49c808e4f01 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -47,6 +47,7 @@ * */ void cpack(unsigned int x); +#ifdef WITH_GL_PROFILE_COMPAT #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) # define glMultMatrixf(x) \ glMultMatrixf(_Generic((x), \ @@ -66,15 +67,21 @@ void cpack(unsigned int x); float (*)[4]: (float *)(x), \ float [4][4]: (float *)(x)) \ ) -/* hacking pointsize and linewidth */ -#define glPointSize(f) glPointSize(U.pixelsize * _Generic((f), double: (float)(f), default: (f))) -#define glLineWidth(f) glLineWidth(U.pixelsize * _Generic((f), double: (float)(f), default: (f))) #else # define glMultMatrixf(x) glMultMatrixf((float *)(x)) # define glLoadMatrixf(x) glLoadMatrixf((float *)(x)) -#define glPointSize(f) glPointSize(U.pixelsize * (f)) -#define glLineWidth(f) glLineWidth(U.pixelsize * (f)) -#endif +#endif /* C11 */ +#endif /* WITH_GL_PROFILE_COMPAT */ + + +/* hacking pointsize and linewidth */ +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) +# define glPointSize(f) glPointSize(U.pixelsize * _Generic((f), double: (float)(f), default: (f))) +# define glLineWidth(f) glLineWidth(U.pixelsize * _Generic((f), double: (float)(f), default: (f))) +#else +# define glPointSize(f) glPointSize(U.pixelsize * (f)) +# define glLineWidth(f) glLineWidth(U.pixelsize * (f)) +#endif /* C11 */ #define GLA_PIXEL_OFS 0.375f -- cgit v1.2.3