From 887d517e3b745945d3c8f7e2dc6e1d791067d1e8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 5 Aug 2012 17:27:52 +0000 Subject: use define for 0.375 = GLA_PIXEL_OFS, used all over the interface. also use M_SQRT1_2 in math_rotation.c --- source/blender/editors/include/BIF_gl.h | 2 ++ source/blender/editors/include/BIF_glutil.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h index a5e5d7ce2e0..479e0b65177 100644 --- a/source/blender/editors/include/BIF_gl.h +++ b/source/blender/editors/include/BIF_gl.h @@ -50,5 +50,7 @@ #define glMultMatrixf(x) glMultMatrixf( (float *)(x)) #define glLoadMatrixf(x) glLoadMatrixf( (float *)(x)) +#define GLA_PIXEL_OFS 0.375f + #endif /* #ifdef __BIF_GL_H__ */ diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index b939ae47ead..577113927d1 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -116,8 +116,8 @@ void glaRasterPosSafe2f(float x, float y, float known_good_x, float known_good_y * * \attention This routine makes many assumptions: the rect data * is expected to be in RGBA unsigned byte format, the coordinate - * (0.375, 0.375) is assumed to be within the view frustum, and the - * modelview and projection matrices are assumed to define a + * (GLA_PIXEL_OFS, GLA_PIXEL_OFS) is assumed to be within the view frustum, + * and the modelview and projection matrices are assumed to define a * 1-to-1 mapping to screen space. * \attention Furthermore, in the case of zoomed or unpixel aligned * images extending outside the view frustum, but still within the -- cgit v1.2.3