[Bf-blender-cvs] [2ad11243726] master: Fix stereoscopic camera volume drawing.

Bastien Montagne noreply at git.blender.org
Mon Apr 10 17:33:01 CEST 2017


Commit: 2ad112437269989439361c23fc9295d642ec11d3
Author: Bastien Montagne
Date:   Mon Apr 10 17:31:39 2017 +0200
Branches: master
https://developer.blender.org/rB2ad112437269989439361c23fc9295d642ec11d3

Fix stereoscopic camera volume drawing.

Not sure how we got to that point, but code was drawing twice one side
of the camera volume, and not at all another side!

===================================================================

M	source/blender/editors/space_view3d/drawobject.c

===================================================================

diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index be2e4ab05e0..3226601be46 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1824,16 +1824,16 @@ static void drawcamera_volume(float near_plane[4][3], float far_plane[4][3], con
 
 	glBegin(mode);
 	glVertex3fv(near_plane[2]);
-	glVertex3fv(near_plane[1]);
-	glVertex3fv(far_plane[1]);
 	glVertex3fv(far_plane[2]);
+	glVertex3fv(far_plane[3]);
+	glVertex3fv(near_plane[3]);
 	glEnd();
 
 	glBegin(mode);
-	glVertex3fv(far_plane[0]);
-	glVertex3fv(near_plane[0]);
-	glVertex3fv(near_plane[3]);
 	glVertex3fv(far_plane[3]);
+	glVertex3fv(near_plane[3]);
+	glVertex3fv(near_plane[0]);
+	glVertex3fv(far_plane[0]);
 	glEnd();
 }




More information about the Bf-blender-cvs mailing list