nimodo wrote:
I tried the TARGET_FLOAT32_IS_FIXED on windows 32bit, here some questions/remarks
warmstart and positioncorrection is off
I do not have a windows machine. Does it work with warmstart and positioncorrection turned on? The is a an issue in the testbed where the frequencyHz is not set correctly because of typing issues. To fix this change line 309 of Main.cpp to:
float settingsHz = 60.0;
GLUI_Spinner* hertzSpinner =
glui->add_spinner("Hertz", GLUI_SPINNER_FLOAT, &settingsHz);
settings.hz = settingsHz;
nimodo wrote:
- it seems, that it is not 100% working (overflow?)- see attached gif capture -, but anyway, thx for the good start
If this is the testbed demo then it works perfectly on my machine (linux/gnu). I don't know what is going on for you, it might be something about your compiler? Did you try the gnu compiler?
nimodo wrote:
- ..\common\Fixed.h(420) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data --- can this compiler warning be ignored ?
If you are getting lots of these I would say that they can be ignored. If you are getting just one then maybe it means something. I did find a problem with the initialization of angularvelocitysquared in b2Settings.h.
nimodo wrote:
- why is the graphics working ? i'm still using the same freeglut library and render.cpp as for floating point
The floating point stuff in box2d is defined as float32, which when using the fixed point implementation is defined as "Fixed". C++ will automatically convert from and to various types. So if you define float x = y, where y is type Fixed, the conversion from Fixed to float is done implicitly.
nimodo wrote:
- is it correct to convert from FIXED to FLOAT with the following macro ?
#define FIXED2FLOAT(x) ((float)(x) / (float)(1 << 16))
See above. You can do the conversion by just using float(x).