lechoo
08-26-2010, 03:07 AM
Hi,
I have very simple image browser which is using opengl to display images. I create texture and display it on single polygon. I want to give user possibility to see image channels: red, green, blue and optionally alpha. How can I force opengl to draw only single channel, for example red? Or even better how can I put red channel into RGB channels to get gray scale image?
Right now for red channel I'm using following mask glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); and result not quite as I wanted (see attached files).
I have very simple image browser which is using opengl to display images. I create texture and display it on single polygon. I want to give user possibility to see image channels: red, green, blue and optionally alpha. How can I force opengl to draw only single channel, for example red? Or even better how can I put red channel into RGB channels to get gray scale image?
Right now for red channel I'm using following mask glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE); and result not quite as I wanted (see attached files).