diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-10-01 11:53:54 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-10-01 11:53:54 +0400 |
commit | 323ad98496cc4b5b95be69d1a81c2bb07ff5bf56 (patch) | |
tree | a8f30b8e20ff6ae3c1ba34fc2df298b25fcfc807 /source | |
parent | 4b0e41b0a724a98bb69aec413e1aa18a6461b42a (diff) |
Fix: gpu_colors_enable could cause 3d display corruption because it always enables glColorMaterial. Make sure to call gpu_colors_disable even if we don't have a mask layer, to match gpu_colors_enable above
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 2aa7bb9cc6b..3e5a14774c2 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1986,7 +1986,7 @@ void GPU_draw_buffers(GPU_Buffers *buffers, DMSetMaterial setMaterial) if (buffers->vert_buf && buffers->index_buf) { glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_NORMAL_ARRAY); - if (buffers->vmask || buffers->gridkey.has_mask) { + if (has_mask) { gpu_colors_enable(VBO_ENABLED); } else { @@ -2036,6 +2036,9 @@ void GPU_draw_buffers(GPU_Buffers *buffers, DMSetMaterial setMaterial) if (has_mask) { gpu_colors_disable(VBO_ENABLED); } + else { + gpu_colors_disable(VBO_DISABLED); + } } /* fallbacks if we are out of memory or VBO is disabled */ else if (buffers->totface) { |