Sign in to follow this  
DumpAlien

Simple Index buffer question..

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

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