[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36607] trunk/blender/source/blender/ editors/space_view3d/view3d_draw.c: fix for glitch with drawing the 2d camera border over the 3d camera.

Campbell Barton ideasman42 at gmail.com
Wed May 11 02:59:23 CEST 2011


Revision: 36607
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36607
Author:   campbellbarton
Date:     2011-05-11 00:59:22 +0000 (Wed, 11 May 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_draw.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c	2011-05-11 00:19:13 UTC (rev 36606)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c	2011-05-11 00:59:22 UTC (rev 36607)
@@ -998,8 +998,12 @@
 	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);
 	




More information about the Bf-blender-cvs mailing list