Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/mesh_extractors/extract_mesh_ibo_fdots.cc
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | static void extract_fdots_iter_poly_mesh(const MeshRenderData *mr, | ||||
| void *_userdata) | void *_userdata) | ||||
| { | { | ||||
| const bool hidden = mr->use_hide && mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; | const bool hidden = mr->use_hide && mr->hide_poly && mr->hide_poly[mp - mr->mpoly]; | ||||
| GPUIndexBufBuilder *elb = static_cast<GPUIndexBufBuilder *>(_userdata); | GPUIndexBufBuilder *elb = static_cast<GPUIndexBufBuilder *>(_userdata); | ||||
| if (mr->use_subsurf_fdots) { | if (mr->use_subsurf_fdots) { | ||||
| const BLI_bitmap *facedot_tags = mr->me->runtime->subsurf_face_dot_tags; | const BLI_bitmap *facedot_tags = mr->me->runtime->subsurf_face_dot_tags; | ||||
| const MLoop *mloop = mr->mloop; | |||||
| const int ml_index_end = mp->loopstart + mp->totloop; | const int ml_index_end = mp->loopstart + mp->totloop; | ||||
| for (int ml_index = mp->loopstart; ml_index < ml_index_end; ml_index += 1) { | for (int ml_index = mp->loopstart; ml_index < ml_index_end; ml_index += 1) { | ||||
| const MLoop *ml = &mloop[ml_index]; | const int vert_i = mr->corner_verts[ml_index]; | ||||
| if (BLI_BITMAP_TEST(facedot_tags, ml->v) && !hidden) { | if (BLI_BITMAP_TEST(facedot_tags, vert_i) && !hidden) { | ||||
| GPU_indexbuf_set_point_vert(elb, mp_index, mp_index); | GPU_indexbuf_set_point_vert(elb, mp_index, mp_index); | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| GPU_indexbuf_set_point_restart(elb, mp_index); | GPU_indexbuf_set_point_restart(elb, mp_index); | ||||
| } | } | ||||
| else { | else { | ||||
| if (!hidden) { | if (!hidden) { | ||||
| Show All 37 Lines | |||||