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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-10-04 10:31:17 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-10-04 10:31:17 +0300
commit52f74923e6957b4dc6e7b37514d864588b922ae6 (patch)
tree2db78fbec9d41673797e9a9fca28c0692a7b488d /source/blender/editors/include/BIF_gl.h
parent61218546cb79dbae09a6102a5695878ea96d0045 (diff)
Fix (coverity-reported) broken 'transform helpers' drawing.
E.g. trackball-arrows (R-R) were no more visible. Caused by wrong cast of an array from int to float, we need an int version of those helpers (`glTranslatenxv`) too.
Diffstat (limited to 'source/blender/editors/include/BIF_gl.h')
-rw-r--r--source/blender/editors/include/BIF_gl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index e2a24b9fed7..58da0b5d695 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -87,11 +87,15 @@ void cpack(unsigned int x);
#define GLA_PIXEL_OFS 0.375f
+BLI_INLINE void glTranslate3iv(const int vec[3]) { glTranslatef(UNPACK3_EX((const float), vec, )); }
+BLI_INLINE void glTranslate2iv(const int vec[2]) { glTranslatef(UNPACK2_EX((const float), vec, ), 0.0f); }
BLI_INLINE void glTranslate3fv(const float vec[3]) { glTranslatef(UNPACK3(vec)); }
BLI_INLINE void glTranslate2fv(const float vec[2]) { glTranslatef(UNPACK2(vec), 0.0f); }
BLI_INLINE void glTranslate3dv(const double vec[3]) { glTranslated(UNPACK3(vec)); }
BLI_INLINE void glTranslate2dv(const double vec[2]) { glTranslated(UNPACK2(vec), 0.0f); }
+BLI_INLINE void glScale3iv(const int vec[3]) { glTranslatef(UNPACK3_EX((const float), vec, )); }
+BLI_INLINE void glScale2iv(const int vec[2]) { glTranslatef(UNPACK2_EX((const float), vec, ), 0.0f); }
BLI_INLINE void glScale3fv(const float vec[3]) { glScalef(UNPACK3(vec)); }
BLI_INLINE void glScale2fv(const float vec[2]) { glScalef(UNPACK2(vec), 0.0); }
BLI_INLINE void glScale3dv(const double vec[3]) { glScaled(UNPACK3(vec)); }