Jump to content

  • Log In with Google      Sign In   
  • Create Account


Calling directx10 effect->settexture redundantly


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 NightcrawlerEX   Members   -  Reputation: 108

Like
0Likes
Like

Posted 09 February 2013 - 09:47 PM

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()
}

Sponsor:

#2 Hodgman   Moderators   -  Reputation: 23970

Like
0Likes
Like

Posted 09 February 2013 - 09:51 PM

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



#3 NightcrawlerEX   Members   -  Reputation: 108

Like
0Likes
Like

Posted 10 February 2013 - 12:51 AM

Thanks




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS