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.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index b06af01bab6..3b7d7bac44f 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -35,10 +35,6 @@
#include "GPU_glew.h"
-/* hacking pointsize and linewidth */
-#define glPointSize(f) glPointSize(U.pixelsize * (f))
-#define glLineWidth(f) glLineWidth(U.pixelsize * (f))
-
/*
* these should be phased out. cpack should be replaced in
* code with calls to glColor3ub. - zr
@@ -51,7 +47,6 @@
* */
void cpack(unsigned int x);
-
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
# define glMultMatrixf(x) \
glMultMatrixf(_Generic((x), \
@@ -71,9 +66,14 @@ 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
#define GLA_PIXEL_OFS 0.375f