[Openmcl-devel] Foreign Function Questions
Brent Fulgham
bfulg at pacbell.net
Fri Nov 24 20:48:08 PST 2006
I have a couple of questions regarding the FFI and interface
databases. Perhaps this is covered in the documentation, but an
initial review did not turn up what I was looking for.
1. Is there a way to get the correct "decorated" names of the FFI
functions from the database? While it's pretty easy (in many cases)
to guess from the original C header, I can't always figure out how
things like arrays and other pointer types are expected to be passed.
2. I would like to define some materials for the OpenGL FFI
interface. In C, this might look something like:
glMaterialfv(GL_BACK, GL_DIFFUSE, {0.396, 0.74151, 0.69102, 1.0});
But if I attempt to call it using something like:
(#_glMaterialfv #$GL_FRONT #$_GL_AMBIENT #(0.396D0 0.74151D0
0.69102D0 1.0D0))
I get an error: "> Error: value #<SIMPLE-VECTOR 4> is not of the
expected type MACPTR."
What's the proper way to declare this in the FFI description?
Thanks,
-Brent
More information about the Openmcl-devel
mailing list