[Openmcl-devel] opengl ffi double-float
beque at telia.com
Mon Feb 21 02:49:21 EST 2005
On måndag, feb 21, 2005, at 08:31 Europe/Stockholm, Dario Lah wrote:
> I have problem with some opengl functions, mainly #_gluPerspective and
> #_glFrustum. These function require double float parameters and
> i call them i get error that params are not of required type.
> I pass 45.0 1.0 etc for params.
> Other function work ok, just these two are making problems.
Do the other functions also expect double floats?
The ffi in OpenMCL doesn't coerce the arguments to foreign functions,
you must make sure they are of the right type yourself. To make a
double float write 45.0d0 instead of 45.0. If you have a value in a
variable you must coerce it with (coerce value 'single-float) (at least
this is what I use).
> I am expanding opengl-ffi.lisp provided with OpenMCL. So, opengl works
> but i simply can not make some ffi calls.
> How to make params double float?
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel