Reputation: 3168
Am wondering how to eliminate the red channel when rendering some objects in OpenGL.
I can do this easily using a fragment shader but unfortunately I can't use shaders for this particular project.
Disable the red channel
DrawOject();
Enable the red channel
Is there any solution for this?
Upvotes: 2
Views: 88
Reputation: 22165
You can control which channels are written to the framebuffer by using glColorMask
. In your case:
glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_TRUE);
Upvotes: 4