🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

depth sorting

Started by
2 comments, last by Fremmed 23 years, 11 months ago
yo. for diffuse lighting to work together with transparency you have to draw the polygons from farthest to nearest. and of course, in order to do this you have to sort the vertices from farthest to nearest. I was just wondering; does this means I''ll have to rotate objects myself? no biggie, really, but it feels like bypassing a rather large chunk of the OpenGL system. I have a feeling everything will become clear to me once I start fiddling with display lists (still just playing around trying to learn the tricks of the trade). am I right? if I am I''ll stop thinking about this for now, and save myself heaps of time.
Advertisement

I am using display lists to display just about everything in my game, and once the vertices are compiled in the list, I no longer have control over the individual verticies, and must use OpenGL''s translate and rotate functions to change the position of my objects.

In Disasteroids 3D, I just draw the 3D objects with the depth buffer on, then disable the depth buffer and draw the transparent 2D objects on the top of the scene. Of course, this works well because the game doesn''t move in the Z-Axis.

ThomW
www.LMNOpc.com
are you using diffuse lighting?
hi guys,
is there any chance you have a second to give me a hand getting my program to work? i''ve posted twice thismorning, an error that i don''t know how to fix...i''m sure it''s something very trivial, and if you could help me out i''d appreciate it so much. thanks very much,

aron
amh@brown.edu

This topic is closed to new replies.

Advertisement