Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Batching polygons and state change

This topic is 5584 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

Hi everyone, I have read a lot of topics about DirectX and I know that I must batch my polygons so I can minimize the DrawIndexPrimitive calls into my main game loop. I don''t understand how I can batch polygons that have different textures, different shaders or different states. Is the number of buffers must equals to the minimum state changes for each frames ? Another question is if I have for example 2 objects that move in my world. Those 2 objects may have their own buffers and for the moment, I do something like this : SetupMatrixForObject1(); DrawObject1(); SetupMatrixForObject2(); DrawObject2(); If I place the 2 objects buffer into 1 buffer, how can I setup the matrix for each objects ?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!