glDrawPixels() with color masking?
I have images with a RGB(200,248,211) background. I need this to be transparent with everything else showing in opengl. I am using glDrawPixels for a good reason which is hard to explain :). All i need to know is how can i remove that color from the picture so it will be transparent when rendered.
I was always using TGA and using textures so i didn't have this problem .
Thanks for any help.
You can do it with alpha blending
Put an alpha channel into the pixels you are sending with glDrawPixels and enable blending and glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
Put an alpha channel into the pixels you are sending with glDrawPixels and enable blending and glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement