PDA

View Full Version : Efficient rendering of static geometry?



karx11erx
07-17-2009, 01:39 PM
Can somebody give me an outline and a few pointers and ideas about how an efficient, simple static geometry renderer (walls, doors) would look like? I just don't know how to do such a thing. I am seeing games that push millions of triangles per frame on the screen, and my little old game I am trying to keep alive fails already at 10,000 or less.

I know how to use VBOs and how to render to render targets, but I do not know enough in order to decrease rendering time of let's say 10,000 triangles with 100 different textures in a neglectable amount of time on some good current graphics hardware.

Actually I wouldn't even know how to separate a lighting pass from a regular render pass.

Tin Whisker
07-17-2009, 03:32 PM
Depends a bit on your target hardware. SM4 hw with texture arrays for example allow you to separate materials from geometry at the batch level. So where once you had to dispatch geometry by material you can now lump into much larger chunks. Of course this holds for dynamic objects too, with the proviso that a buffer update will occur somewhere along the line.

Overall keeping batch counts to the minimum seems to be key in maximizing perf, static or no.

LangFox
07-17-2009, 05:14 PM
Use VBO and VAO
Use DrawInstance

karx11erx
07-18-2009, 01:28 AM
Using SM4 is not really an option.

What is VAO? And DrawInstance? (OpenGL)