Advertisement

influencing GL_BLEND_FUNCS

Started by January 27, 2003 09:56 AM
16 comments, last by arkansas 22 years, 1 month ago
Yeah its completly opaque. I set it up like this.

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);


[edited by - arkansas on January 27, 2003 2:02:26 PM]
Ok. You tell that glColor4f isn''t working. What arguments do you send to glColor4f ?
Also, is lighting enabled ?
Advertisement
Lighting is enabled. I even calculate the Normals of the water so the waves look real.
I send 0,0,1,0.5 to glColor4f;

-> glColor4f(0,0,1,0.5);
Do you have COLOR_MATERIAL enabled ? If not, that''s normal that your surface is not transparent. Because when lighting is enabled, glColor commands are ignored unless COLOR_MATERIAL is enabled.
When you call glEnable(GL_LIGHTING) you should add some lines :

glEnable(GL_LIGHTING);
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);
thanks a lot...
=)
hmm... still not working
Advertisement
What kind of problems happen now ? still the same ? not transpanrent ?

You should try calling glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
cool.. =) its working now. Big Thanks

This topic is closed to new replies.

Advertisement