On Mon, Feb 23, 2009 at 11:58 PM, Eduardo Cavazos
<wayo.cava...@gmail.com> wrote:
>> What could I change that to such that blobs are allowed as the second
>> argument?

void  glGetDoublev( GLenum pname, ___byte_vector params );

(The egg should probably be updated to replace or alias ___blob to
___byte_vector...)

Note: you will receive an incompatible type warning as Chicken will
attempt to pass a char* (the blob) to a function expecting double*
without a cast.  In practice that should not cause a problem.

You could instead use blob->f64vector/shared, in which case your
example becomes:

(let ((bv (make-blob (* 16 8))))
  (glGetDoublev GL_MODELVIEW_MATRIX (blob->f64vector/shared bv))
  bv)

I am not sure if you can declare a foreign type transformation on
GLdouble* to perform this conversion automatically (nor whether that
would be a good idea).  You could write wrappers to do this though.
Once you get to that point, though, your original method starts to
look more attractive...


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to