Blending
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?
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
~Vendayan
Change this line:
to this:
I hope that helps!
glBlendFunc(GL_SRC_ALPHA,GL_ONE);
to this:
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
I hope that helps!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement