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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-24 05:12:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-24 05:12:18 +0300
commit69dd58f210333482e235eaae21bcf193a6903e15 (patch)
treeaadf5c5fc0b2ba963f4f987703e5e2cedfafea85 /source/blender/draw
parent7dfd3539d58263b88499114d95937024771faf57 (diff)
Fix mapped mesh display skipping generated faces
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 018a1e915d7..63c93e95754 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -4423,7 +4423,7 @@ static GPUIndexBuf **mesh_batch_cache_get_triangles_in_order_split_by_material(
BM_mesh_elem_table_ensure(bm_mapped, BM_FACE);
for (uint i = 0; i < poly_len; i++) {
const int p_orig = p_origindex_mapped[i];
- if ((p_orig != ORIGINDEX_NONE) &&
+ if ((p_orig == ORIGINDEX_NONE) ||
!BM_elem_flag_test(BM_face_at_index(bm_mapped, p_orig), BM_ELEM_HIDDEN))
{
const MPoly *mp = &rdata->mpoly[i]; ;
@@ -4470,7 +4470,7 @@ static GPUIndexBuf **mesh_batch_cache_get_triangles_in_order_split_by_material(
for (uint i = 0; i < poly_len; i++) {
const int p_orig = p_origindex_mapped[i];
const MPoly *mp = &rdata->mpoly[i];
- if ((p_orig != ORIGINDEX_NONE) &&
+ if ((p_orig == ORIGINDEX_NONE) ||
!BM_elem_flag_test(BM_face_at_index(bm_mapped, p_orig), BM_ELEM_HIDDEN))
{
const short ma_id = mp->mat_nr < mat_len ? mp->mat_nr : 0;