[Bf-blender-cvs] [0f983e85405] master: Fix T65893: Edit Mesh Culling

Jeroen Bakker noreply at git.blender.org
Thu Jun 27 12:54:19 CEST 2019


Commit: 0f983e8540529025d27fd9197f3d6e95ed476d3d
Author: Jeroen Bakker
Date:   Thu Jun 27 11:55:23 2019 +0200
Branches: master
https://developer.blender.org/rB0f983e8540529025d27fd9197f3d6e95ed476d3d

Fix T65893: Edit Mesh Culling

The edit mesh is culled by object. When the object is not visible on
screen, the edit mesh may still be visible. This change will not  cull the
edit mesh anymore.

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5144

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

M	source/blender/draw/modes/edit_mesh_mode.c

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

diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c
index eca60c291fe..272aa552d38 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -667,17 +667,17 @@ static void edit_mesh_add_ob_to_pass(Scene *scene,
 
   geom_tris = DRW_mesh_batch_cache_get_edit_triangles(ob->data);
   geom_edges = DRW_mesh_batch_cache_get_edit_edges(ob->data);
-  DRW_shgroup_call(edge_shgrp, geom_edges, ob);
-  DRW_shgroup_call(face_shgrp, geom_tris, ob);
+  DRW_shgroup_call_no_cull(edge_shgrp, geom_edges, ob);
+  DRW_shgroup_call_no_cull(face_shgrp, geom_tris, ob);
 
   if ((tsettings->selectmode & SCE_SELECT_VERTEX) != 0) {
     geom_verts = DRW_mesh_batch_cache_get_edit_vertices(ob->data);
-    DRW_shgroup_call(vert_shgrp, geom_verts, ob);
+    DRW_shgroup_call_no_cull(vert_shgrp, geom_verts, ob);
   }
 
   if (facedot_shgrp && (tsettings->selectmode & SCE_SELECT_FACE) != 0) {
     geom_fcenter = DRW_mesh_batch_cache_get_edit_facedots(ob->data);
-    DRW_shgroup_call(facedot_shgrp, geom_fcenter, ob);
+    DRW_shgroup_call_no_cull(facedot_shgrp, geom_fcenter, ob);
   }
 }
 
@@ -702,7 +702,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
 
       if (do_show_weight) {
         geom = DRW_cache_mesh_surface_weights_get(ob);
-        DRW_shgroup_call(g_data->fweights_shgrp, geom, ob);
+        DRW_shgroup_call_no_cull(g_data->fweights_shgrp, geom, ob);
       }
 
       if (do_show_mesh_analysis && !XRAY_ACTIVE(v3d)) {
@@ -713,30 +713,30 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob)
         if (is_original) {
           geom = DRW_cache_mesh_surface_mesh_analysis_get(ob);
           if (geom) {
-            DRW_shgroup_call(g_data->mesh_analysis_shgrp, geom, ob);
+            DRW_shgroup_call_no_cull(g_data->mesh_analysis_shgrp, geom, ob);
           }
         }
       }
 
       if (do_occlude_wire || do_in_front) {
         geom = DRW_cache_mesh_surface_get(ob);
-        DRW_shgroup_call(do_in_front ? g_data->depth_shgrp_hidden_wire_in_front :
-                                       g_data->depth_shgrp_hidden_wire,
-                         geom,
-                         ob);
+        DRW_shgroup_call_no_cull(do_in_front ? g_data->depth_shgrp_hidden_wire_in_front :
+                                               g_data->depth_shgrp_hidden_wire,
+                                 geom,
+                                 ob);
       }
 
       if (vnormals_do) {
         geom = DRW_mesh_batch_cache_get_edit_vertices(ob->data);
-        DRW_shgroup_call(g_data->vnormals_shgrp, geom, ob);
+        DRW_shgroup_call_no_cull(g_data->vnormals_shgrp, geom, ob);
       }
       if (lnormals_do) {
         geom = DRW_mesh_batch_cache_get_edit_lnors(ob->data);
-        DRW_shgroup_call(g_data->lnormals_shgrp, geom, ob);
+        DRW_shgroup_call_no_cull(g_data->lnormals_shgrp, geom, ob);
       }
       if (fnormals_do) {
         geom = DRW_mesh_batch_cache_get_edit_facedots(ob->data);
-        DRW_shgroup_call(g_data->fnormals_shgrp, geom, ob);
+        DRW_shgroup_call_no_cull(g_data->fnormals_shgrp, geom, ob);
       }
 
       if (g_data->do_zbufclip) {



More information about the Bf-blender-cvs mailing list