lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 4/17/06, Richard Ranft <rranft@lvcablemodem.com> wrote:
> >
> > Hello:
> >
> > I've read that DirectX causes problems with Lua because it sets the FPU
> > to single-precision mode.  [...]
>
> Anyone have a suggested workaround/fix for this?
>
> Richard

There are two workarounds suggested on the lua bugs page
(http://www.lua.org/bugs.html#5.1):

   The simplest solution is to use DirectX with the D3DCREATE_FPU_PRESERVE flag
   Otherwise, you can change the definition of lua_number2int in
luaconf.h to this one:

   #define lua_number2int(i,d)   __asm fld d   __asm fistp i

Greg F