bird flying between mountain

i am writing a game
i wrote a scene (3 wall with texture of sky ,1 wall with texture of grass, 2 mountain with glutSolidCone )
and a bird is flying in the scene,

but in the display() if i write :

//draw scene

bird flies in front of mountain

but if i write:

//draw scene

bird flies behind of mountain

but i want that bird flies behind and in front of mountain and ofcourse between them,what’s wrong? what should i do?

thanks in advance :slight_smile:

You probably didn’t enable depth test or you don’t have a depth buffer.

yes i forgot it
but when i write glEnable(GL_DEPTH_TEST); in the init and run my program ,it shows nothing just black window. now what should i do?