Fade in-out a textured quad ?

How can I change the transparency of a textured quad in OpenGL ? because I tried using glColor4f(255,255,255,0) and it was still visible, isnt the last parameter the alpha one? - Im confused …!

I need to fade in and out textured quads … and perhaps move them from point A to point B smoothly - I can only do a rough movement (from point a to b no interpolation) is there any examples on doing this? also mouse picking? I got an example and it was very well loaded of crap!! why isnt there any example with 2 cubes on screen and nothing else than that, where it lets you mouse pick on them… instead of moving crap with sounds and stupidity for a mouse picking example…!!

Have you created a 32-bit texture? You actually need an image (say targa) that supports transparency. I haven’t ever changed the transparency values on the fly though. Another reason would be that you haven’t set up properly glBlendFunc. Look it up in the manual. I think that if your texture is all opaque then you’ve got a problem with glBlendFunc and you don’t really need a 32-bit texture.
As for mouse picking I think the example in the red book is a simple one. Good luck!

Well My blendfunc is nice, everything works as it should - I want to fade a quad out and then fade another one in, ever used FlashMX? like that, change the transparency of the “object” (a simple quad in this case).

Were can i get that redbook example? is it the one with the snowmans? it didnt work nice here, I clicked the right top snowman and it didnt get which one I clicked on…!

somehow when i tried again it worked nice glcolor4f ! this is weird … too weird.

Hmm, something must’ve slipped through the cracks then :slight_smile: Good job, finding it.
For the red book do a search for OpenGL Programming Guide. “red book” is just the nick, err…because it’s red. There’s an old version lurking around for free. As for the example, it’s just 3 quads. Very fancy :smiley:


hmm but i only have VC++ 6.0 standard how im going to compile this ?

If you’re talking about glut go here