Polygon sorting in openGL.
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).
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.
That''s the way I do it anyway.
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
------------------------------
#pragma twice
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement