[ODE] ODE behaving differently for different renderers
deplinenoise at gmail.com
Tue Feb 20 00:26:36 MST 2007
On 2/20/07, Hampus Soderstrom <hampus at sxp.se> wrote:
> I have not verified this but doesn't DirectX change the FPU precision
> when starting up?
It does, unless you tell it not to. I wouldn't recommend doing this,
because if DX9 triggers a FPU exception it can wreak havoc on its
internal state. What I've always done is to restore the precision
outside the rendering loop when needed.
Here's the flag to pass when creating the device if you're ok with the above:
Forces Direct3D to not change the floating-point unit control word,
running the pipeline using the precision of the calling thread.
Without this flag, Direct3D defaults to setting the floating-point
unit to single-precision round-to-nearest mode. Using this flag with
the floating-point unit in double-precision mode will reduce Direct3D
Note Portions of Direct3D assume floating-point unit exceptions are
masked. Unmasking such exceptions may lead to undefined behavior.
More information about the ODE