[Bf-blender-cvs] [99fde39f490] blender2.8: OpenGL: fix color logic op
Mike Erwin
noreply at git.blender.org
Thu Apr 27 20:20:39 CEST 2017
Commit: 99fde39f49054fcb2abce58777096f47fc5ad4a9
Author: Mike Erwin
Date: Thu Apr 27 14:18:33 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB99fde39f49054fcb2abce58777096f47fc5ad4a9
OpenGL: fix color logic op
GL_LOGIC_OP is a synonym for GL_INDEX_LOGIC_OP, from OpenGL 1.0's indexed color drawing. It's not part of modern GL and causes an error in core profile.
GL_COLOR_LOGIC_OP is still supported in the latest GL. It's the last stage before writing to the framebuffer.
Part of T51164
===================================================================
M source/blender/gpu/intern/gpu_draw.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 3567fc1f062..181cd0ad4bc 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -2271,7 +2271,7 @@ void GPU_state_init(void)
glDisable(GL_ALPHA_TEST);
glDisable(GL_BLEND);
glDisable(GL_DEPTH_TEST);
- glDisable(GL_LOGIC_OP);
+ glDisable(GL_COLOR_LOGIC_OP);
glDisable(GL_STENCIL_TEST);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
More information about the Bf-blender-cvs
mailing list