Hello,

Here's a very simple program which loads the identity matrix into the modelview matrix and prints it.

In Ypsilon the output is:

1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0

In Larceny:

1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0

In Ikarus:

-7.8444546361096485e-47 -1.6927012645721864e-47 -1.6929518360776174e-47 -4.68090291810639e-48 -4.68090291810639e-48 -1.404463395421578e-40 -1.6927012645721864e-47 -4.68090291810639e-48 -4.68090291810639e-48 -1.4318587803991283e-40 -7.844454636109656e-47 -1.445619531318798e-40 -1.4521075432086219e-40 1.6916004837e-312 -4.68090291810639e-48 -4.68090291810639e-48

(basically all zeros)

I'll look into it myself. But I thought I'd mention here.

Ed

----------------------------------------------------------------------
(define (get-modelview-matrix)
  (let ((bv (make-bytevector (* 16 8))))
    (glGetDoublev GL_MODELVIEW_MATRIX bv)
    bv))

(glutInit (vector 0) (vector ""))

(glutInitDisplayMode GLUT_RGBA)

(glutInitWindowPosition 100 100)
(glutInitWindowSize 500 500)

(glutCreateWindow "test")

(glutDisplayFunc
 (lambda ()
   (glMatrixMode GL_MODELVIEW)
   (glLoadIdentity)

   (do ((i 0 (+ i 1)))
       ((= i 16))
     (display
      (bytevector-ieee-double-native-ref (get-modelview-matrix) (* i 8)))
     (display " "))

   (flush-output-port (current-output-port))))

(glutMainLoop)
----------------------------------------------------------------------

Ed

Reply via email to