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:
authorAntony Riakiotakis <kalast@gmail.com>2012-10-01 11:53:54 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-10-01 11:53:54 +0400
commit323ad98496cc4b5b95be69d1a81c2bb07ff5bf56 (patch)
treea8f30b8e20ff6ae3c1ba34fc2df298b25fcfc807 /source/blender/gpu
parent4b0e41b0a724a98bb69aec413e1aa18a6461b42a (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/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c5
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) {