Calling directx10 effect->settexture redundantly

Started by
1 comment, last by NightcrawlerEX 11 years, 2 months ago
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()
}
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

Thanks

This topic is closed to new replies.

Advertisement