Transparency in opengl

Ok, I know how to organize a list based on the objects their Z-Coordinate, my problem is that if I rotate the objects then it goes wrong. I have rearranged the array by the Z-Index, and drawn them in OGL, but when i move through the program and rotate 180 degrees, I see the objects I drew first in front, so the transparency in screwed up.

My question is, how do i find the position of the camera in opengl, this way i can arange the object by distance from the camera
Are you talking about Z-sorting?
Last edited on
Topic archived. No new replies allowed.