[.net] Conversion UINT' to 'FLOAT

Started by
15 comments, last by Dave84311 18 years, 9 months ago
As mentioned above:

Ones a surface, anothers a vector and anothers a imageinfo for dx.

D3DXIMAGE_INFO imageInfo;
D3DSURFACE_DESC desc;
D3DXVECTOR2 m_vScale;

The problems with others not showing is related. When I nop out that code it seems to work fine just deformed. Without it being a pointer I believe it is causing the problems.

Dancin_Fool I was getting errors when doing that. Odly...
Dave G.http://www.higstudios.comProjects:Project BU - Fast action pvp MOG
Advertisement
By the way, there is a bug in the JIT that make conversion from uint to either float or double slow as hell. Instead you have to convert first to int to speed iy up.


uint i = 256;
double t;
t = (double)i; // very slow
t = (double)(int)i; // faster
This is now offically driving me nuts...
Dave G.http://www.higstudios.comProjects:Project BU - Fast action pvp MOG
Quote:Original post by Lenolian
By the way, there is a bug in the JIT that make conversion from uint to either float or double slow as hell. Instead you have to convert first to int to speed iy up.


uint i = 256;
double t;
t = (double)i; // very slow
t = (double)(int)i; // faster



Won't you lose data if you're working with values large enough, though? I mean, someone probably decided to start with a uint for a reason...

At any rate, if Dave is using managed C++, he can use the functions that Drew_Benton and I suggested (will the bug rear it's head when using those functions?). If he's not using managed C++, he won't have to worry about bugs in the JIT.
~del
Well fixing that created a bug with no other objects showing and I've been trying everything to get it to work with no solution.
Dave G.http://www.higstudios.comProjects:Project BU - Fast action pvp MOG
Anyone have any ideas why?
Dave G.http://www.higstudios.comProjects:Project BU - Fast action pvp MOG
Guess not.
Dave G.http://www.higstudios.comProjects:Project BU - Fast action pvp MOG

This topic is closed to new replies.

Advertisement