Advertisement

Z-Sorting!

Started by August 20, 2002 11:54 AM
1 comment, last by shiverz 22 years, 6 months ago
hi there ok maybe it seems to be a stupid question (yeah ok it is), but how can I find the Z value from a vertex ive sent to ogl ? do I need to calculate the matrices myself without using glRotate and glTranslate, then getting a vector from them ? it would work but there must be a better way ... now some people will ask why I''m sorting ... to have proper blending/collision of course ! also I''m using vertex arrays.
Check out: gluProject, gluUnProject

Oztan
Advertisement
you can also multiply your point with combined modelview and projection matrix to get final position on screeen (and depth). Remember that reading back anything from video card is SLOW so you''re better of just calculating it yourself.

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement