Commit: 611779ca967bc97ab052203f654e72530cd7d57c
Author: Campbell Barton
Date:   Tue May 23 17:48:05 2017 +1000
Branches: blender2.8
https://developer.blender.org/rB611779ca967bc97ab052203f654e72530cd7d57c

Cleanup: use more generic naming

Can be used by any user that needs faces split by materials.

===================================================================

M       source/blender/draw/intern/draw_cache_impl_mesh.c

===================================================================

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) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to