[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Math.Random() always returns 0
- From: "Beric Holt" <beric@...>
- Date: Thu, 25 May 2006 09:53:41 +1200
Thanks everyone for the feedback.
I've added the D3DCREATE_FPU_PRESERVE flag which solves the problem
perfectly. I did some rather unscientific benchmarking (eyeballing the
FPS counter) with and without the flag and I didn't see any performance
hit. Then again, I'm working with a pretty low polygon count and not
doing much with projection matricies.
I'm still quite keen to look into the alternative Random functions in
the future, but at this stage my time is better spent elsewhere on the
Can anyone comment on what has changed between lua v5.02 and v5.1 to
cause the functionality of the math.random() function to change?
>I experienced the exact same thing when I upgraded InkSpector
>(Windows/DirectX) from Lua 5.0 to 5.1. By using the
>D3DCREATE_FPU_PRESERVE option when creating the D3D device, the
>math.random problem vanished.
>View this message for more info