• Advertisement
Sign in to follow this  

Calling directx10 effect->settexture redundantly

This topic is 1805 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 am using multiple calls to drawindexed for a single model to draw submeshes and some of the meshes have the same texture but different material stats etc.

When i call settexture is there an internal check directx does to see if i am setting the same texture again or does it benefit me to check myself?

E.g.

For(submeshes)
{
Settexture()
Otherstuff()
Draw()
}

Compared to

For(submeshes)
{
If(!textureissame) settexture()
Otherstuff()
Draw()
}

Share this post


Link to post
Share on other sites
Advertisement

When i call settexture is there an internal check directx does to see if i am setting the same texture again or does it benefit me to check myself?

If you create a debug device, it should perform this internal check, but only so it can print a warning that you're making redundant calls.
So, yep, you should filter out redundant calls yourself wink.png

Share this post


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

  • Advertisement