lua-users home
lua-l archive

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


Framework Studios: Hugo wrote:
I actually zoomed in to a call to DirectX9-s CreateDevice() (which returns
successfully, I don't think it is memory leaking / writing in invalid
places). *Right* before CreateDevice() string.sub works, *right* after
CreateDevice(), string.sub fails.

This could be the FAQ where DirectX sets the FPU precision to
single, which starts to clobber double lua_numbers.  I think
there was a thread about it quite recently (or maybe I'm mixing
up this list with one of the many others where people get frequently
hit by the same DirectX misdesign... sigh...).

There's a DirectX init flag which causes DirectX calls to preserve
the FPU state, which is anecdotally a speed hit but avoids the
problem.  Using OpenGL is also a pretty good workaround. :D

Regards,
--Adam
--
Adam D. Moss   -   adam@gimp.org