From 03d0219d7ae5916500a45b157bd7a637310ef494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 12 Oct 2018 15:09:43 +0200 Subject: Edit Mesh: Refactor edit mesh drawing This decouple the vertex display from the face+edges. This is to reduce the number of triangles required to fix the edges artifacts (aliasing) and increase viewport reactivity when not actively navigating (ie. mouse scroll). Also it makes all vertices visible (not cut-off) even when navigating. However it makes the navigation drawing a bit slower because it has to render twice. Also add a depth bias to the wires to avoid depth fighting when previewing final mesh (modifiers applied). --- source/blender/draw/intern/draw_cache_impl.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/draw/intern/draw_cache_impl.h') diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index 27272769ec6..575670319d8 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -143,10 +143,12 @@ struct GPUBatch *DRW_mesh_batch_cache_get_fancy_edges(struct Mesh *me); struct GPUBatch *DRW_mesh_batch_cache_get_edge_detection(struct Mesh *me, bool *r_is_manifold); struct GPUBatch *DRW_mesh_batch_cache_get_overlay_triangles(struct Mesh *me); struct GPUBatch *DRW_mesh_batch_cache_get_overlay_triangles_nor(struct Mesh *me); +struct GPUBatch *DRW_mesh_batch_cache_get_overlay_verts(struct Mesh *me); struct GPUBatch *DRW_mesh_batch_cache_get_overlay_loose_edges(struct Mesh *me); struct GPUBatch *DRW_mesh_batch_cache_get_overlay_loose_edges_nor(struct Mesh *me); struct GPUBatch *DRW_mesh_batch_cache_get_overlay_loose_verts(struct Mesh *me); struct GPUBatch *DRW_mesh_batch_cache_get_overlay_facedots(struct Mesh *me); +struct GPUTexture *DRW_mesh_batch_cache_get_overlay_data_tex(struct Mesh *me); /* edit-mesh selection (use generic function for faces) */ struct GPUBatch *DRW_mesh_batch_cache_get_facedots_with_select_id(struct Mesh *me, uint select_id_offset); struct GPUBatch *DRW_mesh_batch_cache_get_edges_with_select_id(struct Mesh *me, uint select_id_offset); -- cgit v1.2.3