views:

299

answers:

1

Hi,

I have an OpenGL texture with transparent and opaque pixels (eg, texture contains a circle, area outside the circle is transparent with alpha of 0.0).

I'm mapping this texture to a simple quad using GL_DECAL mode, and it works-- the transparent parts of the texture are invisible, and I see my circle against the background of the quad.

Now I want to make the quad transparent. When I do this, though, the texture takes on the transparency values of the underlying quad, so when I set the quad to "fully transparent" with 0.0 alpha, the texture is invisible.

How do I make the QUAD transparent, but keep the opaque portions of the TEXTURE visible?

Many thanks...

+3  A: 

I am not an expert, and I do not have time to try but instead of GL_DECAL, I think using GL_REPLACE will work for you.

tafa
I was just fiddling with that and it worked like a charm! Thanks.
James D