lua-users home
lua-l archive

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


On Wed, Mar 15, 2006 at 04:02:16PM +0100, Framework Studios: Hugo wrote:
> Yes, I am aware of the difference between float and double.
> 
> It's because we're using DirectX... it sets the FPU to single precision 
> mode so eighter we have to use float-s or Lua starts acting really weird 
> after init of DirectX.
> 
> Note the DirectX documentation claims DirectX to be slower when preserving 
> the FPU flag; about "D3DCREATE_FPU_PRESERVE" it sais:

You don't need to switch Lua to floats to avoid this problem. If you
really want to keep DirectX as it is, you can recompile Lua to use the
default definition for lua_number2integer:

luaconf.h:544
- #if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) && !defined(__SSE2__) && \
-     (defined(__i386) || defined (_M_IX86) || defined(__i386__))
+ #if 0

-- Roberto