Sign in to follow this  
xsirxx

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

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
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

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