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.
This commit is contained in:
Campbell Barton
2011-05-11 00:59:22 +00:00
parent 56c5d71f1c
commit a3ab7c01bb

View File

@@ -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);