Eduardo Cavazos wrote:
Let's suppose I take this approach, where I use Chicken blobs in place
of R6RS bytevectors. There's one problem that exists. Some of the
procedures in the OpenGL egg want f64vector objects. For example, this
results in an error:
(let ((bv (make-blob (* 16 8))))
(glGetDoublev GL_MODELVIEW_MATRIX bv)
bv)
Again for comparison, the OpenGL libraries in Larceny, Ypsilon, and
Ikarus allow a bytevector to be passed to 'glGetDoublev'.
I'm willing to use a customized gl egg for my purposes. This is from
'gl.scm' in the opengl egg:
void glGetDoublev( GLenum pname, GLdouble *params );
What could I change that to such that blobs are allowed as the second
argument?
OK, here's what I came up with. The opengl egg uses easyffi. So the line
for 'glGetDoublev' is:
void glGetDoublev( GLenum pname, GLdouble *params );
Again, my goal here is to be able to pass a blob as the second argument.
By using 'foreign-lambda' directly, I was able to get it to work:
(define glGetDoublev
(foreign-lambda void glGetDoublev unsigned-integer blob))
So my question is, how can I express that in easyffi? I.e. I'd like to
be able to have something like:
void glGetDoublev( GLenum pname, blob params );
I'm guessing something involving the ___declare( type , ... ) form.
Ed
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users