Sign in to follow this  
NightcrawlerEX

Calling directx10 effect->settexture redundantly

Recommended Posts

NightcrawlerEX    108
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
Hodgman    51223

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

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