lua-users home
lua-l archive

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

Roberto Ierusalimschy wrote:
It seems that too many people are having problems with this DirectX issue.
How can we solve that??

doc + runtime check sounds ideal to me.  Sure, the offending
macro could be turned off, but someone running default-D3D
combined with double-Lua with or without this macro is a fair
indication that they're simply unaware that their precision is
being decimated.  Thus a warning should be issued that refers
developers to their three options:
* Don't let D3D mess with their double maths (surely the sane
choice for anyone who isn't very, very familiar with the
practical precision requirements of ALL third-party code and
libraries they're using, probably-negligible D3D performance
hit be damned).
* Recompile Lua with floats instead of doubles, at least
making it explicit that they're getting single precision
* Compile-out the Lua warning and disable the spicey
macro, where the developer is confident that they can
live with the precision hit and moving to explicit floats
isn't an option (i.e. LuaJIT users).