On Mon, Jun 29, 2009 at 7:13 PM, Jakob Reschke jakob@resfarm.de wrote:
However now I am facing another problem: how do I find out the current matrix mode (I want to save it for later return)? gl:get-integer and cl-opengl-bindings::get-integer-v don't seem to return usable values:
You need an active GL context in order to experiment with these calls. Here's a quick and dirty way to do that:
(glut:display-window (make-instance 'glut:window)) <abort the main loop with C-c> (gl:get-string :version) => "3.0.0 NVIDIA 180.44"
It occurs to me that it'd be nice to use OSMesa for this sort of thing, namely for a test suite. I've attached some bindings to OSMesa if someone feels like playing with this as I don't have time right now. Here's an example:
CL-USER> (gl:matrix-mode :projection) ; No value CL-USER> (gl:get-integer :matrix-mode) 5889 CL-USER> (cffi:foreign-enum-keyword '%gl:enum *) :PROJECTION CL-USER> (gl:get-string :version) "2.1 Mesa 7.4"
HTH.
-- Luís Oliveira http://student.dei.uc.pt/~lmoliv/