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.


Abdulaziz Ghuloum wrote:

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. :-)

Ikarus Scheme version 0.0.4-rc1+ (revision 1747, build 2009-04-02)
Copyright (c) 2006-2008 Abdulaziz Ghuloum

> #vu8(0 0 0 0 0 0 240 63 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240 63 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240 63 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 240 63)

Bam! ;-)

Patches on the way...

Ed

Reply via email to