Jump to content
  • Advertisement
Sign in to follow this  
DumpAlien

Simple Index buffer question..

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

Hello there again! I have a simple question... Lets say I have some vertex buffers with object geometry... Is it better to call IASetIndexBuffer() before any draw call or should I use offsets in one big index buffer? so i will set the index buffer once? /me is using D3D10 thanks for your time!

Share this post


Link to post
Share on other sites
Advertisement
Reducing state switching is a good thing, but distorting your software design to minimize state changes is a bit too far. At least with Direct3D 10 where the overhead of such calls is a lot better than with Direct3D 9.

Get it right, then get it tight - ideally optimization won't affect the correctness of your code [smile]

Jack

Share this post


Link to post
Share on other sites
If you find yourself already designing a new system and needing to group buffers together for related objects, then it would make sense. Otherwise, it's like giving everyone on the same street one vehicle. It's better for the environment, but it's awkward and inconvenient to everyone who needs to use it.

Okay, bad analogy. Nature is a little more precious than rendering optimizations. The point is that graphics cards and CPUs will keep improving, but your engine's awkward design to take advantage of something trivial will remain constant.

Share this post


Link to post
Share on other sites
thanks for your replies guys :D I will do it first with setting index buffer before every call.. and maybe in the future change it for optimization!
thanks again!

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!