lua-users home
lua-l archive

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


Adam D. Moss wrote:

Jan Kratochvíl wrote:

Well at least in one case i found solution. It is the 3) and it is the one discussed here today. lua_number2int isn't working for me because of DirectX. Switching to floats and redefining lua_number2int solves it.


I guess the 'right' solution is telling DirectX to leave doubles
as doubles.

Well it is maybe *correct* solution but it is one with worse performance.
There is D3DCREATE_FPU_PRESERVE for this.
quote from DirectX documentation
"D3DCREATE_FPU_PRESERVE
Indicates that the application needs either double precision FPU or FPU exceptions enabled. Direct3D sets the FPU state each time it is called. Setting the flag will reduce Direct3D performance."
Jan Kratochvil
Illusion softworks, a.s.