I think there is no operation for RGB data doing that. But there is
GLSL, which allow you to code a little program that is executed for
every pixel drawn ("FragmentProgram"). With this you could do any keying
operation you like. Quite complicated way, though.
Judie schrieb:
> Hi,
>
> Lets say I have two images in memory. The first image is black and
> white (single channel - no alpha), the second one is RGB (no alpha)
> and has a black background.
>
> My goal is to draw the first BW image to the color buffer in its
> entirety. And then to draw the second one over it making the second's
> black background transparent without having to modify the image i.e.
> add an alpha channel. That way the first image will show through where
> the second image was black. If I could use a 2D Blit operation I could
> specify that the color black was transparent. Is there an equivalent
> type of operation in OpenGL?
>
> Thanks,
>
> Judie


|