Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Calling directx10 effect->settexture redundantly

4: Adsense

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   

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

#2 Hodgman   Moderators   

50843
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   

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.