[Bf-blender-cvs] [b368724] master: Fix define issues w/ WITH_GL_PROFILE_COMPAT off
Campbell Barton
noreply at git.blender.org
Mon Jul 20 05:37:55 CEST 2015
Commit: b36872446418f73a0d494fe193a38af10d14ba2d
Author: Campbell Barton
Date: Mon Jul 20 13:08:26 2015 +1000
Branches: master
https://developer.blender.org/rBb36872446418f73a0d494fe193a38af10d14ba2d
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).
===================================================================
M 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 3b7d7ba..49c808e 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
More information about the Bf-blender-cvs
mailing list