OpenGL Depth buffer: Information

Hi!
I need help for this code:

void DrawMyScene()
{

room.drawGLroom
glDepthFunc(GL_ALWAYS);
ball.drawGLBall();
glDepthFunc(GL_LESS);

}

with this code I want design a ball with texture inside a room, alwais visible. When the ball is back a wall of room, i can see him.
In this mode tha ball is alwais visibe, but when hi move in my scene, sometime the texture go away e return.
Why?

Hi !

I am not sure what you mean, but is it GL_ALWAYS you want to use for the depth test function ???

Mikael

You need to set the depth function before drawing the object, not after.

Nico