diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-11 04:59:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-11 04:59:22 +0400 |
commit | a3ab7c01bb5c73e51b35f7ad1ee1e712cfceba20 (patch) | |
tree | bf63a9617f3263cf21bab79b02a29f675445a7ef /source/blender | |
parent | 56c5d71f1ce79160d6a3fffbbc1f78a10d0e2686 (diff) |
fix for glitch with drawing the 2d camera border over the 3d camera.
seems arbitrary and may be driver specific, but this value is in the middle of what works well on mesa software GL & my nvidia.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index fe0b0b7c928..a45dfe8a281 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -998,8 +998,12 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) y2= viewborder.ymax; /* apply offsets so the real 3D camera shows through */ - x1i= (int)(x1 - 1.0f); - y1i= (int)(y1 - 1.0f); + + /* note: quite un-scientific but without this bit extra + * 0.0001 on the lower left the 2D border sometimes + * obscures the 3D camera border */ + x1i= (int)(x1 - 1.0001f); + y1i= (int)(y1 - 1.0001f); x2i= (int)(x2 + 1.0f); y2i= (int)(y2 + 1.0f); |