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??

Zeno

06-28-2002, 09:33 AM

The first one, by far. You'll get even more speed up if you can draw in a rough front to back order.

-- Zeno

dabeav

06-28-2002, 09:38 AM

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??

Korval

06-28-2002, 05:09 PM

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.

Zeno

06-28-2002, 06:40 PM

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.