Commit: 2250834b406b53de34558c9454407fcb20287568
Author: Mike Erwin
Date:   Sun Mar 29 02:04:35 2015 -0400
Branches: GPU_data_request
https://developer.blender.org/rB2250834b406b53de34558c9454407fcb20287568

use glDrawRangeElements for camera

glDrawElements has no way to say how much data from the vertex array is
needed, so use the Range variant instead.

glDrawArrays already has this range info.

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

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 3178560..14f3b82 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -1974,7 +1974,7 @@ static void drawcamera_new(Scene *scene, View3D *v3d, 
RegionView3D *rv3d, Base *
                        copy_v3_v3(vec[7], tvec); /* left */
                }
 
-               glDrawElements(GL_LINES, 22, GL_UNSIGNED_BYTE, line_indices);
+               glDrawRangeElements(GL_LINES, 0, 7, 22, GL_UNSIGNED_BYTE, 
line_indices);
 
                /* draw an outline arrow for inactive cameras and filled
                 * for active cameras. We actually draw both outline+filled

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to