Transparency

BlitzMax Forums/OpenGL Module/Transparency

Gavin Beard(Posted 2006) [#1]
Hey all....again.

just looking for an easy example of adjusting the transparency of a quad 'on the fly'.
i can get alpha channel workin via texture but i want to be able to fade a quad in/out? is this possible at all?


kfprimm(Posted 2006) [#2]
glColor4f?


Gavin Beard(Posted 2006) [#3]
i had already tried that but it just turned the textured quad a color between grey and black depending on alpha value. however seems like if i moved the glcolor4f after the gltexcoord3f it works so my bad..


ImaginaryHuman(Posted 2006) [#4]
Yah because the tex coord defines a vertex, which has to exist before you can assign a color to the vertex.


Cruis.In(Posted 2006) [#5]
cant you use setalpha, and do it from there. pardon my ignorance if i am talking about something completely different.

but i have a cloaking in my game, where when you cloak, the ship slowly fades to 0.3 alpha, and when you uncloak, slowly goes back to being opaque. very slow and well timed. is this what you want?


Gavin Beard(Posted 2006) [#6]
similar effect, but i need to render a texture to an quad then fade the qaud, which parameter 4 of the glColor4f command does :)