int and uint changes #470
Replies: 4 comments 1 reply
-
Hi, Thanks, |
Beta Was this translation helpful? Give feedback.
-
My Vortice program and my coding experienceis are both not large but I did the conversion in 2 hours work. I was using -1 as significative value so I had to change strategy. |
Beta Was this translation helpful? Give feedback.
-
I think that there are a couple of classes where INT is the value based upon the fact there are a couple of c# conversion issues. These are based upon how c# seems to enforce type inference. For example in Texture2DShaderResourceView there is a Miplevel which is UINT, but you can set this to -1 (now, this is sort of a hack from what i recall for the c++ handling), but in c# you really need to set uint.MaxValue instead to represent the same byte format. |
Beta Was this translation helpful? Give feedback.
-
BTW. After I moved from INT to UINT, I seem to have improved my framerate by around 10 to 20 percent. Anecdotal atm. My project is very large btw. Notes of pain: Using Size, Box etc are all int based, so there are a few conversions. On the whole though, not so bad. |
Beta Was this translation helpful? Give feedback.
-
I'm getting hundreds of errors due to some changes with methods asking for uint now and not being compatible with various code that interacts with them. For example...
IWICBitmapSourceSize.Width - integer
But PixelFormat.GetStride(Guid guid, uint width)
Was this change intentional? Usually, integer is selected for its broad compatibility, even though uint might make more sense as a container for valid values.
Or are we just expect to go through and type (uint) hundreds of times? (225 for me). And even making a few changes, It has ballooned out to 300. This is a nightmare.
What's the rationale in using int or uint in any situation?
Beta Was this translation helpful? Give feedback.
All reactions