PDA

View Full Version : Transparent Grayscale Pixmaps



03-26-2006, 10:40 AM
Hi, I'm drawing a grayscale pixmap to the screen using glDrawPixels(). Is there anyway to both change the color of the drawn pixels (such as tinting them red) and also prevent the black pixels from being drawn at all?
Thanks,
Josh

Tin Whisker
03-27-2006, 01:14 AM
Josh, have you tried using a texture with an alpha mask?

You could modulate the texture with the vertex color to get your red tinting.

In general, glDrawPixels is not considered a good idea in performance-critical areas.