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

Started by
3 comments, last by xsirxx 16 years, 10 months ago
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
--X
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.
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....
--X
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?
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?
--X

This topic is closed to new replies.

Advertisement