64bit precision

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
not_a_commie
Posts: 19
Joined: Wed Mar 21, 2007 6:22 pm

64bit precision

Post by not_a_commie »

My project (a GIS tool) needs 64bit precision throughout. Has anyone successfully modified Irrlicht to use s64 instead of s32? I saw a post where a guy changed the typedef on s32 to double. I like that idea, but he never got it all working.

Thanks,
Brannon
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

Why don't you do your calculations etc. within your own objects and then convert everything for displaying in irrlicht?. (The way most physics library wrapper work.) Create some kind of scale factor to do the conversion (as you won't see a 0.00000000000...1 pixel difference anyway) and to change the precision depending on your detail/zoom level.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can't change s32 to something different. The colors (4 bytes) depend on it. But you might be able to change f32 to f64.
not_a_commie
Posts: 19
Joined: Wed Mar 21, 2007 6:22 pm

Post by not_a_commie »

So if I were to convert all the f32 to f64, would that mean I could add a transform that would run in double precision? Or is all the data all shipped to the hardware by that point?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You'd have to use an extended meshbuffer format, if it is possible at all. But on the CPU side you can take full advantage of the precision if you really can change all the operations.
Post Reply