diff options
author | Jeroen Bakker <jeroen@blender.org> | 2019-12-03 10:27:55 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2019-12-04 17:17:09 +0300 |
commit | 9c337fcfe2a46b2ccfb8a4960b7af0eac5c615de (patch) | |
tree | d85b5e66174d01ef509fa49745fecf70a9043955 /source/blender/draw/intern/draw_cache_extract.h | |
parent | 186d74020e50f894982fb678434716dc2646171b (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_extract.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache_extract.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h index b1eab3c73ae..7ee02c3c556 100644 --- a/source/blender/draw/intern/draw_cache_extract.h +++ b/source/blender/draw/intern/draw_cache_extract.h @@ -115,8 +115,9 @@ typedef struct MeshBufferCache { * Only need to be updated when topology changes. */ struct { /* Indices to vloops. */ - GPUIndexBuf *tris; /* Ordered per material. */ - GPUIndexBuf *lines; /* Loose edges last. */ + GPUIndexBuf *tris; /* Ordered per material. */ + GPUIndexBuf *lines; /* Loose edges last. */ + GPUIndexBuf *lines_loose; /* sub buffer of `lines` only containing the loose edges. */ GPUIndexBuf *points; GPUIndexBuf *fdots; /* 3D overlays. */ |