hidden-wire draw option: always use the cage when masking out faces otherwise modifie...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 22 Jul 2013 21:45:01 +0000 (21:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 22 Jul 2013 21:45:01 +0000 (21:45 +0000)
source/blender/editors/space_view3d/drawobject.c

index dca1160b1948762f3d584e3bbbdcb360ce9e16f5..38386a5c26705df5aa9ee70dea0b43ffae34f878 100644 (file)
@@ -3132,9 +3132,10 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d,
        }
        else if (dt > OB_WIRE) {
                if (use_occlude_wire) {
+                       /* use the cageDM since it always overlaps the editmesh faces */
                        glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-                       finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts,
-                                                GPU_enable_material, NULL, me->edit_btmesh, 0);
+                       cageDM->drawMappedFaces(cageDM, draw_em_fancy__setFaceOpts,
+                                               GPU_enable_material, NULL, me->edit_btmesh, 0);
                        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
                }
                else if (check_object_draw_texture(scene, v3d, dt)) {