[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Passing blobs to glGetDoublev in (hacked) OpenGL eg
Re: [Chicken-users] Passing blobs to glGetDoublev in (hacked) OpenGL egg
Tue, 24 Feb 2009 02:24:28 -0600
On Mon, Feb 23, 2009 at 11:58 PM, Eduardo Cavazos
>> What could I change that to such that blobs are allowed as the second
void glGetDoublev( GLenum pname, ___byte_vector params );
(The egg should probably be updated to replace or alias ___blob to
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
(let ((bv (make-blob (* 16 8))))
(glGetDoublev GL_MODELVIEW_MATRIX (blob->f64vector/shared 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] Passing blobs to glGetDoublev in (hacked) OpenGL egg, Eduardo Cavazos, 2009/02/24
- [Chicken-users] Re: bytevectors, (continued)