Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-07-20 06:08:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-20 06:08:26 +0300
commitb36872446418f73a0d494fe193a38af10d14ba2d (patch)
tree8388952911b545a2976ab39a4de10610e7bf572e /source/blender/editors/include/BIF_gl.h
parentcd91fd655d35de9aa10c254d53a3ad4cf92db17e (diff)
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).
Diffstat (limited to 'source/blender/editors/include/BIF_gl.h')
-rw-r--r--source/blender/editors/include/BIF_gl.h19
1 files changed, 13 insertions, 6 deletions
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