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:
Diffstat (limited to 'source/blender/editors/include/BIF_gl.h')
-rw-r--r--source/blender/editors/include/BIF_gl.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index cd26bb22ada..3b7d7bac44f 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -35,17 +35,6 @@
#include "GPU_glew.h"
-#ifdef __APPLE__
-
-/* hacking pointsize and linewidth */
-# define glPointSize(f) glPointSize(U.pixelsize * (f))
-# define glLineWidth(f) glLineWidth(U.pixelsize * (f))
-#else
- /* avoid include mismatch by referencing 'U' from both */
-# define glPointSize(f) glPointSize(((void)U.pixelsize, (f)))
-# define glLineWidth(f) glLineWidth(((void)U.pixelsize, (f)))
-#endif
-
/*
* these should be phased out. cpack should be replaced in
* code with calls to glColor3ub. - zr
@@ -58,23 +47,33 @@
* */
void cpack(unsigned int x);
-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define glMultMatrixf(x) \
glMultMatrixf(_Generic((x), \
float *: (float *)(x), \
+ float [16]: (float *)(x), \
float (*)[4]: (float *)(x), \
+ float [4][4]: (float *)(x), \
const float *: (float *)(x), \
- const float (*)[4]: (float *)(x)) \
+ const float [16]: (float *)(x), \
+ const float (*)[4]: (float *)(x), \
+ const float [4][4]: (float *)(x)) \
)
# define glLoadMatrixf(x) \
glLoadMatrixf(_Generic((x), \
float *: (float *)(x), \
- float (*)[4]: (float *)(x)) \
+ float [16]: (float *)(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
#define GLA_PIXEL_OFS 0.375f