influencing GL_BLEND_FUNCS
Hey...
How can I influence the transparency?? I coded a Water animation engine, but the water is too hollow. Is there a way to decrease the transparency.
arkansas
do some research on alpha blending. you will need to call
glEnable(GL_BLEND);
and set up a few other parameters as well. but most importantly, when you specify color for something, call glColor4f(), and the last param is for alpha, which specified how much you want your object to blend with whatever is behind it. it ranges from 0 - 1, 0 being completely transparent, and 1 being completely solid. check the red book, they talk about it pretty well
glEnable(GL_BLEND);
and set up a few other parameters as well. but most importantly, when you specify color for something, call glColor4f(), and the last param is for alpha, which specified how much you want your object to blend with whatever is behind it. it ranges from 0 - 1, 0 being completely transparent, and 1 being completely solid. check the red book, they talk about it pretty well
How is created your texture ? Is it read from disk ? If so, you can for sure open this file with an image editor (eg photoshop or paint shop pro) and edit the alpha channel to fit in your rendering requirements.
by "it''s only color", you mean there''s no alpha channel ? Well you can also change RGB components using an image editor.
BTW, what''s your blending function actually ?
BTW, what''s your blending function actually ?
So you have an alpha channel, don''t you ?
Could you also please post the piece of code that uploads the texture image from client memory to server (ie call to glTexImage2D) ?
Could you also please post the piece of code that uploads the texture image from client memory to server (ie call to glTexImage2D) ?
I don''t need to use a texture. I only need glColor3f(0,0,1); because I animated the water.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement