Sign in to follow this  
ramy

Batching Question

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this