AW: Lua x DirectX

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

AW: Lua x DirectX

Sebastian Rohde
Hi,

I think 1+3 or 1+2 would be the best options. For the third option: Wouldn't
it be feasible to add the check upon the first call to this macro in the
debug version?
Another thing: This problem could be caused by DirectX but mentioning it
only in this context seems improper to me. We had this problem because we
decided to use single precision an ensured this everywhere (Whether that is
good or not doesn't matter for the fact that it is not a DirectX issue).

Yours,
Sebastian


-----Ursprüngliche Nachricht-----
Von: [hidden email]
[mailto:[hidden email]] Im Auftrag von
[hidden email]
Gesendet: Mittwoch, 15. März 2006 17:52
An: Lua discussion list
Betreff: Lua x DirectX

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

- Some people suggested adding some warning in the manual. Would this
really help? I mean, if you find an unexpected bug in a program, where
will you search for help? In the manual? In what section?

- Another option would be to simply turn off the offending macro
(lua_number2int) in Windows. This will slow down Lua a bit... Of
course, anyone is free to use it, but the default would avoid the
problem. (Doesn't Windows offer lrint? Could we use it instead?)

- Other option would be to add a check somewhere in the code, so
that this situation is detected early and gives a proper error message.
(Unfortunately, the test cannot be when creating a Lua state, because
there is no way to return an error message. Maybe when loading a chunk?)

-- Roberto