I’m using gluperspective for a program (solar sys type thing), and the program draws objects that are behind other objects.
What commands determine whether something is drawn or not?
With gluperspective, you shift the system, while when I used glortho, objects were drawn correctly, not overdrawing each other.
More specifically, when an object moves about the center of the system, the system rotates with it so that you “ride” the planet so to speak. Since the arctangent function returns a number between pi/2 and
-pi/2, at pi/2 increasing, the vector orthogonalizes and rather than follow earth around, you’re on the exact opposite side of the sun…that’s fixable, however, when I use gldepthfunc gl_greater, then as you follow earth (assuming it’s on the interval where it follows it correctly), the moon always ends up hidden when it passes, when I use gl_less it always end up showing, even when it’s in behind the earth with respect to the viewport.
Does that mean I have to constantly toggle between the depthfunc constants? That doesn’t make sense since to do that I could just create a drawing order.
All help appreciated.
[This message has been edited by Kurt B (edited 05-23-2000).]