Jump to content
  • Advertisement
Sign in to follow this  
xsirxx

[.net] using Device.Anything, is there overhead for gets?

This topic is 4154 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

Is there any overhead in checking these states? for instance if I were to do a... if( Device.VertexFormat != VertexFormats.None ) Device.VertexFormat == VertexFormats.None; would that have more overhead than just settings Device.VertexFormat? or less? Thanks much! EDIT: btw this is C# under MDX 2.0

Share this post


Link to post
Share on other sites
Advertisement
MDX 2.0? O_O but how? It's expired, okay you meant MDX 1.1..

Just do Device.VertexFormat = VertexFormats.None.

Why bother with the check? But either way, the difference is insignificant to even worry about. There are bigger fish to fry than this. This will not be the bottleneck in your application by any stretch of the imagination.

Share this post


Link to post
Share on other sites
Yea still using 2.0. The reason for this is not exactly my answer to give unfortunatly....

OK well seems I wont harp too much on it... I just like to set the LEAST amount of state changes that I possibly can... But of course I wasnt sure if checking against them would make it even slower....

Share this post


Link to post
Share on other sites
It's actually hard to say since MDX has a built in "State Manager" so one would expect it not to change the state unless it's not the same. But I don't know the inner workings of MDX enough. I don't think there is much of a performance hit changing states anyway.

The reason I thought you made a mistake about using MDX 2.0 is that you can't use it anymore because the runtimes have expired. I have heard of people turning clocks back and even hacking the dll's to get them to work. What are you doing to avoid the time bomb?

Share this post


Link to post
Share on other sites
Quote:
Original post by Headkaze
What are you doing to avoid the time bomb?


Ahh well I knew that they stopped supporting it in a way but didnt know that they time bombed it...

I am using an older sdk though, havent updated to the latest, not sure if that has something to do with it....Hope that helps?

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!