Hey, guys,
I wanna draw a ball inside a wire cube.
and the cube is drawn before the ball.
the problem is that the ball looks like floating on the surface of the cube instead of inside it.
that is i cannot see the front edges of the cube , for they are covered by the ball.
is there anything function i’d call to achieve the space relationships between objects?
How are you drawing your objects?
Are you using gl Push/pop matrix when drawing them?
Also is the depth buffer enable?
Originally posted by Unicron:
[b]Hey, guys,
I wanna draw a ball inside a wire cube.
and the cube is drawn before the ball.
the problem is that the ball looks like floating on the surface of the cube instead of inside it.
that is i cannot see the front edges of the cube , for they are covered by the ball.
is there anything function i’d call to achieve the space relationships between objects?
i enabled blending( after i clear the depth buffer bit, the scene appeared but the ball moves to the back of the cube, and once the blending was disabled, the ball was placed inside the cube, could anyone tell me why ?)