On Apr 2, 2009, at 10:55 PM, Eduardo Cavazos wrote:
OpenGL allows you to get the current modelview matrix via the
function 'glGetDoublev'.
Here's that procedure from 'gl.ss' that comes with Ikarus:
;; void glGetDoublev( GLenum pname, GLdouble *params )
(define-function void glGetDoublev (int byte*))
So, you pass in a bytevector.
When I wrote the ypsilon-compat library, I (incorrectly) interpreted
the byte* as an "in" parameter; that is, the bytevector is copied to
a temporary buffer that's passed to glGetDoublev, and the buffer is
then freed. What I should've done is to copy the data back from the
buffer into the bytevector. It should be straightforward to fix.
Patches welcome. :-)
Aziz,,,