diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-23 01:02:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-23 01:02:00 +0300 |
commit | d6e180e75af4d1c66d3284d8d779b178a1f6a16f (patch) | |
tree | ab6450c5aeea1a664daf52caee9b77d01a8368e9 /source/blender/blenkernel/intern/cdderivedmesh.c | |
parent | 74f7ef12408b6199e14a2fee2d447092d3039522 (diff) |
Fix T45117: Dark dupli-face objects (regression)
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 002d302c3c6..30e0bc233e8 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -420,9 +420,14 @@ static void cdDM_drawEdges(DerivedMesh *dm, bool drawLooseEdges, bool drawAllEdg static void cdDM_drawLooseEdges(DerivedMesh *dm) { - GPU_edge_setup(dm); - GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, dm->drawObject->loose_edge_offset * 2, (dm->drawObject->totedge - dm->drawObject->loose_edge_offset) * 2); - GPU_buffer_unbind(); + const int start = (dm->drawObject->loose_edge_offset * 2); + const int count = (dm->drawObject->totedge - dm->drawObject->loose_edge_offset) * 2; + + if (count) { + GPU_edge_setup(dm); + GPU_buffer_draw_elements(dm->drawObject->edges, GL_LINES, start, count); + GPU_buffer_unbind(); + } } static void cdDM_drawFacesSolid(DerivedMesh *dm, |