Blending

Started by
2 comments, last by GregC 22 years, 6 months ago
OK in NeHe''s 8th tut(the one about about blending). It says this line glColor4f(1.0f,1.0f,1.0f,0.5f); sets the brightness full and 50% alpha. I understand that. But it also says that the alpha value is the last value and that 0.0f is completely transparant and 1.0f is completely opaque. When I change this value to 1.0f the cube I get is not completely opaque. What''s happening?
Advertisement
I dont know must about OpenGL but have you tried omitting the 4th argument or setting it to null? Also are you setting a flag somewhere when you are rendering to make the primitive transparent?

~Vendayan
"Never have a battle of wits with an unarmed man. He will surely attempt to disarm you as well"~Vendayan
Change this line:

glBlendFunc(GL_SRC_ALPHA,GL_ONE); 


to this:

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 


I hope that helps!
Thanks

This topic is closed to new replies.

Advertisement