• Advertisement
Sign in to follow this  

Batching Question

This topic is 4629 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a question regarding the Batching. As i understand the batch, is rendering the triangles that have the same render states? can someone explain to me the batching, and why is it used for? I know batching speeds the rendering process, but i dont know why or how. thx in advanced.

Share this post


Link to post
Share on other sites
Advertisement
A 'batch' is a single API draw call. You batch because every draw call will cost, and every state change (texture, shader, etc) costs. Basically without an efficient batching system you will even run into problems with small/simple scenes.. let alone complex scenes.

Share this post


Link to post
Share on other sites
so basically anything that has the same render states and materials and ... in my scene has to be rendered together? but off course not in one DrawPrimitive call.

Share this post


Link to post
Share on other sites
The more you draw in a single Draw[Indexed]Primitive call the better. So, if you have a lot of stuff that uses the same exact stuff (texture, pixel/vertex shader, material) you should put this in a single vertex buffer and draw it all in a single call.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement