PDA

View Full Version : using glDrawPixels with separated R G B



weber_ofir
08-27-2000, 12:49 PM
I am using glReadPixels to read each component of the color (R G B) separatly. Now i want to manipulate each one of the component and then, combine them again and use glDrawPixels to update the color buffer. Is anyone know how to combine the component again?

thank you.

paul
08-31-2000, 12:14 AM
You can try to write separated R G B by
using glColorMask.

For instance:
glColorMask(GL_TRUE,GL_FALSE,GL_FALSE,GL_FALSE);
glDrawPixels(...
glColorMask(GL_FALSE,GL_TRUE,GL_FALSE,GL_FALSE);
glDrawPixels(...
glColorMask(GL_FALSE,GL_FALSE,GL_TRUE,GL_FALSE);
glDrawPixels(...
glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);