Horde3D http://www.horde3d.org/forums/ |
|
atof() function is locale dependent http://www.horde3d.org/forums/viewtopic.php?f=3&t=1897 |
Page 1 of 1 |
Author: | andi853 [ 04.09.2013, 03:55 ] |
Post subject: | atof() function is locale dependent |
Hi! I've been developing an eclipse plugin(with a java binding to horde) to visualize the movement of robots which are attached to a robotics API. When I tested my application on Linux, I observed strange behaviour of the model transformation: Rotation, Position and Scale of each Mesh were always a rounded number after I used the addNodes function. Also the Material uniform color was always black. After several hours I found out, that when e.g. a material was loaded, its uniform rgba values were always 0. When I looked at the egMaterial class, the atof function caught my attention and then I stumbled upon this thread: https://www.allegro.cc/forums/thread/600366/813300 So the case was here that e.g. the value 0.3 was converted to a 0 because the dot was not interpreted as part of a decimal number I solved the problem simply by setting the locale as described in the thread inside the egMain class once. Maybe it's a java specific problem... but I wanted to let you know anyway ![]() Greetings |
Author: | Volker [ 05.09.2013, 19:42 ] |
Post subject: | Re: atof() function is locale dependent |
I stumbled across that problem myself some days ago. Not sure if Horde should change the locale itself, as it may disturb the application's default behaviour. |
Author: | Zuck [ 09.09.2013, 14:16 ] |
Post subject: | Re: atof() function is locale dependent |
As suggested at the end of the previous link, maybe this can be the solution: http://www.cplusplus.com/reference/ios/ios/imbue/ |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |