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:
authorTon Roosendaal <ton@blender.org>2003-10-23 14:23:38 +0400
committerTon Roosendaal <ton@blender.org>2003-10-23 14:23:38 +0400
commitf2637d90b911a3d7a691859d491f14c07aa63d72 (patch)
treea033c68e0a12223bda669b50872413833d73c37a /source/blender/src/mywindow.c
parent063205cc517a5ebdf6bd93cb848003f486238ca5 (diff)
- changed ortho2 calls by default... according the 'opengl correctness'
chapter in 'opengl programming guide' you have to offset the matrix with 0.375 for exact & predictable cross platform pixel drawing. Blender used 0.5.... Committed for test among platforms... if you see weird drawing results (like polygons not aligning good with lines) just notify me.
Diffstat (limited to 'source/blender/src/mywindow.c')
-rw-r--r--source/blender/src/mywindow.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/src/mywindow.c b/source/blender/src/mywindow.c
index cfee5d27b45..a4a5e8267fc 100644
--- a/source/blender/src/mywindow.c
+++ b/source/blender/src/mywindow.c
@@ -438,7 +438,9 @@ void bwin_ortho(int winid, float x1, float x2, float y1, float y2, float n, floa
void bwin_ortho2(int win, float x1, float x2, float y1, float y2)
{
- bwin_ortho(win, x1, x2, y1, y2, -1, 1);
+ // in blender it's always called with -0.5... according to opengl
+ // manual it should 0.375 for correctness. added for test
+ bwin_ortho(win, x1+0.125, x2+0.125, y1+0.125, y2+0.125, -1, 1);
}
void bwin_frustum(int winid, float x1, float x2, float y1, float y2, float n, float f)