Commit: e74177d3b17fc9e1c51af1794e4e120906d852a5
Author: Campbell Barton
Date:   Wed May 17 17:14:10 2017 +1000
Branches: blender2.8
https://developer.blender.org/rBe74177d3b17fc9e1c51af1794e4e120906d852a5

Correct own error in copying vertex color to VBO's

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

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 d1b06df0f33..7059fd46ef5 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -838,7 +838,7 @@ static void rgb_from_weight(float r_rgb[3], const float 
weight)
 }
 
 
-/** Ensure #MeshRenderData.vert_color */
+/** Ensure #MeshRenderData.vert_weight_color */
 static void mesh_render_data_ensure_vert_weight_color(MeshRenderData *rdata, 
const int defgroup)
 {
        float (*vweight)[3] = rdata->vert_weight_color;
@@ -2046,8 +2046,8 @@ static VertexBuffer *mesh_batch_cache_get_tri_vert_colors(
                                /* Assume 'use_hide' */
                                if (!BM_elem_flag_test(ltri[0]->f, 
BM_ELEM_HIDDEN)) {
                                        for (uint tri_corner = 0; tri_corner < 
3; tri_corner++) {
-                                               const int v_index = 
BM_elem_index_get(ltri[tri_corner]->v);
-                                               VertexBuffer_set_attrib(vbo, 
attr_id.col, cidx++, vert_color[v_index]);
+                                               const int l_index = 
BM_elem_index_get(ltri[tri_corner]);
+                                               VertexBuffer_set_attrib(vbo, 
attr_id.col, cidx++, vert_color[l_index]);
                                        }
                                }
                        }
@@ -2057,8 +2057,8 @@ static VertexBuffer *mesh_batch_cache_get_tri_vert_colors(
                                const MLoopTri *mlt = &rdata->mlooptri[i];
                                if (!(use_hide && (rdata->mpoly[mlt->poly].flag 
& ME_HIDE))) {
                                        for (uint tri_corner = 0; tri_corner < 
3; tri_corner++) {
-                                               const uint v_index = 
rdata->mloop[mlt->tri[tri_corner]].v;
-                                               VertexBuffer_set_attrib(vbo, 
attr_id.col, cidx++, vert_color[v_index]);
+                                               const uint l_index = 
mlt->tri[tri_corner];
+                                               VertexBuffer_set_attrib(vbo, 
attr_id.col, cidx++, vert_color[l_index]);
                                        }
                                }
                        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to