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>2012-08-05 21:27:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-05 21:27:52 +0400
commit887d517e3b745945d3c8f7e2dc6e1d791067d1e8 (patch)
treed4c962031f7efb788d7b63705f155f92f4867219 /source/blender/windowmanager/intern/wm_subwindow.c
parentdfdfa06c27c6dc44cb3f05e0355279d9e16eab93 (diff)
use define for 0.375 = GLA_PIXEL_OFS, used all over the interface.
also use M_SQRT1_2 in math_rotation.c
Diffstat (limited to 'source/blender/windowmanager/intern/wm_subwindow.c')
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index 0b9dc441227..529910d220e 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -141,7 +141,7 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4])
int width, height;
wm_subwindow_getsize(win, swin->swinid, &width, &height);
- orthographic_m4(mat, -0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f, -100, 100);
+ orthographic_m4(mat, -GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS, -100, 100);
}
else
glGetFloatv(GL_PROJECTION_MATRIX, (float *)mat);
@@ -175,7 +175,7 @@ int wm_subwindow_open(wmWindow *win, rcti *winrct)
/* extra service */
wm_subwindow_getsize(win, swin->swinid, &width, &height);
- wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f);
+ wmOrtho2(-GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS);
glLoadIdentity();
return swin->swinid;
@@ -229,7 +229,7 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct)
/* extra service */
wmSubWindowSet(win, swinid);
wm_subwindow_getsize(win, swinid, &width, &height);
- wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f);
+ wmOrtho2(-GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS);
}
else {
printf("%s: Internal error, bad winid: %d\n", __func__, swinid);
@@ -268,7 +268,7 @@ void wmSubWindowScissorSet(wmWindow *win, int swinid, rcti *srct)
else
glScissor(_curswin->winrct.xmin, _curswin->winrct.ymin, width, height);
- wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f);
+ wmOrtho2(-GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS);
glLoadIdentity();
glFlush();