Polygon sorting in openGL.

Started by
2 comments, last by dxantos 23 years, 6 months ago
What is the fastest way for doing polygon sorting? I need this to sort polygons with alpha values in their textures. (for the solid ones, Zbuffer does fine).
Advertisement
http://web2.airmail.net/sjbaker1/alpha_sorting.html
You might want to look into BSP trees. That way you can avoid using the Z buffer and get the correct results from your textures with alpha channels. It''s also fast.

That''s the way I do it anyway.
-----------------------------Mice are an excellent source of mice.
If you just want a fast sort, you could use an implementation of the QuickSort algorithm to sort your polygons by Z-Value. There is a premade QuickSort in search.h called qsort(). BSP is also good, as it will correctly render the polygons from any viewpoint and uses next to no runtime computation.

------------------------------
#pragma twice


sharewaregames.20m.com

This topic is closed to new replies.

Advertisement