rotation problem


I have an horizontal plane at z = 0.0f and a
tree from 0.0f to 1.0f.

When I rotate this scene 180 degrees, the lower part of the trunk is sticking out from the plane. How do I conceal this lower part??


try to be more specific…

I don’t understand the question either !

try to be more clear with some code or something…

Do you mean that the plane and tree are not rotating about the same point?

Do you mean that one can see the lower part of the tree when looking from beneath the plane?

Yes Micheal …
you are right …
both the tree and the plane are rotating about the same point …
and I can see the bottom of the tree when I
rotate to the bottom of the plane.

Shouldnt the tree be covered by the plane??

Perhaps you have GL_LEQUAL as depth func.
Try to call that upon initialization:

glDepthFunc( GL_LESS );

I’ve already used glDepthFunc(GL_LESS)
but I can still see the bottom of the tree when I rotate 180 degrees.

Any more advices??? THanks!