I'm making a few examples to start learning about JOGL.
But I'm having a little confusion with 3D view.
The image below shows my problem.
The rectangle pink and red are like as walls in my example, and the larger blue rectangle would be like heaven. The Z coordinate of the walls is much smaller than the sky, but when I go walking till I get behind the sky, the walls are drawn on the sky. The most logical would be the sky hide the walls, since their position was to hide.
The order in which design objects make a difference? How do I know which to draw first? I thought I could draw in any order and glu.gluLookAt define what would appear.
I'm using the camera with gluLookAt and gluPerspective.
Any help will be very welcome.