PDA

View Full Version : Objekts in front of others..



zenon
02-22-2003, 04:29 AM
Well.. so I've drawn two objects.
The first is a tower, the second one is a
small cottage-house.

When I rotate the "world" using glRotate
the house (that is located BEHIND the tower)
can be viewed IN FRONT of the tower when it
actually should be behind it.

On the other hand, the tower turns out to
stay at it's location as it should.

Why can I se the house during rotation, when
it should not be seen?

Rmbt
02-22-2003, 08:51 AM
It's look like a depth test problem

nexusone
02-22-2003, 12:55 PM
Try glEnable(GL_DEPTH_TEST)
also make sure you just not rotating the scene wrong.



Originally posted by zenon:

Well.. so I've drawn two objects.
The first is a tower, the second one is a
small cottage-house.

When I rotate the "world" using glRotate
the house (that is located BEHIND the tower)
can be viewed IN FRONT of the tower when it
actually should be behind it.

On the other hand, the tower turns out to
stay at it's location as it should.

Why can I se the house during rotation, when
it should not be seen?

zenon
02-23-2003, 06:28 AM
Thanx.. it works now, after calling
the depth test..

=)