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>2017-05-23 10:48:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-23 10:48:05 +0300
commit611779ca967bc97ab052203f654e72530cd7d57c (patch)
tree5aeaedb0c5245ef0b9458bdb8797102eb3fb23c0 /source/blender/draw/intern/draw_cache_impl_mesh.c
parentf21c235c6fa6782dfc9c0ba7a66fa3c1005b2897 (diff)
Cleanup: use more generic naming
Can be used by any user that needs faces split by materials.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_mesh.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 8286c2ea23a..b6c66037a53 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -1812,7 +1812,8 @@ static VertexBuffer *mesh_batch_cache_get_tri_shading_data(MeshRenderData *rdata
int vbo_len_used = 0;
VertexBuffer_allocate_data(vbo, vbo_len_capacity);
- /* TODO deduplicate all verts and make use of ElementList in mesh_batch_cache_get_shaded_triangles_in_order. */
+ /* TODO deduplicate all verts and make use of ElementList in
+ * mesh_batch_cache_get_triangles_in_order_split_by_material. */
for (int i = 0; i < tri_len; i++) {
float *tri_uvs[3], *tri_tans[3];
unsigned char *tri_cols[3];
@@ -2615,7 +2616,8 @@ static ElementList *mesh_batch_cache_get_triangles_in_order(MeshRenderData *rdat
return cache->triangles_in_order;
}
-static ElementList **mesh_batch_cache_get_shaded_triangles_in_order(MeshRenderData *rdata, MeshBatchCache *cache)
+static ElementList **mesh_batch_cache_get_triangles_in_order_split_by_material(
+ MeshRenderData *rdata, MeshBatchCache *cache)
{
BLI_assert(rdata->types & (MR_DATATYPE_VERT | MR_DATATYPE_LOOPTRI | MR_DATATYPE_POLY));
@@ -3189,7 +3191,7 @@ Batch **DRW_mesh_batch_cache_get_surface_shaded(Mesh *me)
cache->shaded_triangles = MEM_callocN(sizeof(*cache->shaded_triangles) * mat_len, __func__);
- ElementList **el = mesh_batch_cache_get_shaded_triangles_in_order(rdata, cache);
+ ElementList **el = mesh_batch_cache_get_triangles_in_order_split_by_material(rdata, cache);
VertexBuffer *vbo = mesh_batch_cache_get_tri_pos_and_normals(rdata, cache);
for (int i = 0; i < mat_len; ++i) {
@@ -3222,7 +3224,7 @@ Batch **DRW_mesh_batch_cache_get_surface_texpaint(Mesh *me)
cache->texpaint_triangles = MEM_callocN(sizeof(*cache->texpaint_triangles) * mat_len, __func__);
- ElementList **el = mesh_batch_cache_get_shaded_triangles_in_order(rdata, cache);
+ ElementList **el = mesh_batch_cache_get_triangles_in_order_split_by_material(rdata, cache);
VertexBuffer *vbo = mesh_batch_cache_get_tri_pos_and_normals(rdata, cache);
for (int i = 0; i < mat_len; ++i) {