diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-01 12:00:15 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-01 12:00:15 +0400 |
commit | 7955cb78d6ec403ee7a3c99f5228532cc44690e4 (patch) | |
tree | dd74400f1a306c935131000a030bc00f93b7531c /source/blender/gpu | |
parent | 9904127e335769bf376dae70cebee355b88ed5d8 (diff) |
Fix for "Show Diffuse Color" was having affect on mesh without mask
Only happened with VBOs enabled.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 9559a752800..0518d253136 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1442,7 +1442,7 @@ void GPU_update_mesh_pbvh_buffers(GPU_PBVH_Buffers *buffers, MVert *mvert, int i, j, k; buffers->vmask = vmask; - buffers->show_diffuse_color = show_diffuse_color; + buffers->show_diffuse_color = (vmask == NULL) || show_diffuse_color; if (buffers->vert_buf) { int totelem = (buffers->smooth ? totvert : (buffers->tot_tri * 3)); @@ -1657,7 +1657,7 @@ void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, CCGElem **grids, VertexBufferFormat *vert_data; int i, j, k, x, y; - buffers->show_diffuse_color = show_diffuse_color; + buffers->show_diffuse_color = (key->has_mask == false) || show_diffuse_color; /* Build VBO */ if (buffers->vert_buf) { @@ -1892,7 +1892,7 @@ static GLuint gpu_get_grid_buffer(int gridsize, GLenum *index_type, unsigned *to } GPU_PBVH_Buffers *GPU_build_grid_pbvh_buffers(int *grid_indices, int totgrid, - BLI_bitmap **grid_hidden, int gridsize) + BLI_bitmap **grid_hidden, int gridsize) { GPU_PBVH_Buffers *buffers; int totquad; |