[Openmcl-devel] opengl ffi double-float

Anders Conradi beque at telia.com
Sun Feb 20 23:49:21 PST 2005


On måndag, feb 21, 2005, at 08:31 Europe/Stockholm, Dario Lah wrote:

> Hi!
>
> I have problem with some opengl functions, mainly #_gluPerspective and
> #_glFrustum. These function require double float parameters and 
> whenever
> 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?
>
> Dario
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>





More information about the Openmcl-devel mailing list