[cl-opengl-devel] Find out the current matrix-mode?
Luís Oliveira
luismbo at gmail.com
Tue Jun 30 01:05:48 UTC 2009
On Mon, Jun 29, 2009 at 7:13 PM, Jakob Reschke <jakob at 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osmesa.lisp
Type: application/octet-stream
Size: 1616 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-opengl-devel/attachments/20090630/b253fc99/attachment.obj>
More information about the cl-opengl-devel
mailing list