What would be faster??
Rendering, say, 4 indexed vertex arrays with 10k polys a piece, and then letting the depth buffer sort things out.
OR
Rendering the polys either a Plane at a time, or a Poly at a time, furthest to closest, and then droping out the depth buffer??
The first one, by far. You’ll get even more speed up if you can draw in a rough front to back order.
– Zeno
Thats what i thought, but then WHY? Do engines like quake render them individualy?? Or dont they, i thought they rendered by distance of the brush??
Rendering the polys either a Plane at a time, or a Poly at a time, furthest to closest, and then droping out the depth buffer??
Because every time you say, “Render this”, you incur some non-insignificant overhead (especially if you’re using something like VAR or VAO). Therefore, you should try to render a lot of stuff in a single glDraw(Range)Elements call.
Also, the z-buffer is helpful in reducing rendering time. By rendering back-to-front (but not per-polygon, do it per-object), you will cull out unseen pixels. Entire textures may never even be touched. And GeForce3+ and Radeon’s have some nice z-hardware to cull out entire groups of pixels at a time.
I think Korval means front to back in his post, not back to front.
The only thing you want to draw back to front are transparent objects.
– Zeno
Zeno is correct; I meant front-to-back.