Blending Problems

i draw to the screen a textured cube and then enable blending and make sure depth testing is disabled then wrote :
glColor4f(0.5,0.5,0.5,0.5);
glBegin(GL_QUADS);
//front
…(stuff that draws the front face)
//back

//top

//bottem

//left

//right
glEnd();
and it draws the cube with the texture on it and it is blended but when i rotate it so that another face is facing me, sometimes it looks more transperent or less depending on which face im viewing

can anyone help?

IT sounds like you’re drawing your transparent cube faces in the wrong order.

When you draw transparent primitives, you have to render them in the order back to front. Otherwise it doesn’t look right.

A trick for convex objects, is to do this.

Enable Front face culling.
Render Object.
Enable Back face culling.
Render object.

That way, the polys in front of the object will be drawn over the top of the polys behind, regardless of how you rotate it.

See the CVA demo on my website to see this in action. www.nutty.org

Nutty