lua-users home
lua-l archive

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


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
project.

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?

Cheers
Beric Holt
Soap Dragon
http://buzzrick.emedia.net.nz 


>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
>http://lua-users.org/lists/lua-l/2006-01/msg00348.html

>Cheers,
>Mark.