Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2019-12-03 10:27:55 +0300
committerJeroen Bakker <jeroen@blender.org>2019-12-04 17:17:09 +0300
commit9c337fcfe2a46b2ccfb8a4960b7af0eac5c615de (patch)
treed85b5e66174d01ef509fa49745fecf70a9043955 /source/blender/draw/intern/draw_cache_impl_mesh.c
parent186d74020e50f894982fb678434716dc2646171b (diff)
Fix T72130: Wireframe Visible After Disabling
The lines index buffer can contain all edges (edit mode) or only loose edges (object mode). When switching between these modes the wrong content of the index buffer can be used. This patch will clear the lines index buffer when a `loose_edges` is requested. Making sure it is always up to date. Note that this is supporting an exising hack where the IBO is truncated during the creation. We should find a different way how to solve these kind of issues. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6349
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_mesh.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index dd6749638a7..7c7178eae85 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -1228,7 +1228,8 @@ void DRW_mesh_batch_cache_create_requested(
DRW_vbo_request(cache->batch.all_edges, &mbufcache->vbo.pos_nor);
}
if (DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)) {
- DRW_ibo_request(cache->batch.loose_edges, &mbufcache->ibo.lines);
+ DRW_ibo_request(NULL, &mbufcache->ibo.lines);
+ DRW_ibo_request(cache->batch.loose_edges, &mbufcache->ibo.lines_loose);
DRW_vbo_request(cache->batch.loose_edges, &mbufcache->vbo.pos_nor);
}
if (DRW_batch_requested(cache->batch.edge_detection, GPU_PRIM_LINES_ADJ)) {