If I load cl-opengl, save the Lisp image (e.g., with sb-ext:save-lisp-and-die 
on SBCL) and then load the image and call (cl-glut:init), then cl-glut::
%glutInit doesn't get called because the variable cl-glut::*glut-initialized-
p* is set to T (it retains its value when the image is saved). For me, this 
manifests in the following error:
>freeglut  ERROR:  Function <glutSolidTeapot> called without first calling 
'glutInit'.

If I set cl-glut::*glut-initialized-p* to NIL before saving the image, then 
cl-glut works after restarting the saved image.

I propose to clear the cl-glut::*glut-initialized-p* when the image is saved.

The source code change (for SBCL) might look like this:

(defun clear-initialized-p () (setf *glut-initialized-p* nil))
#+sbcl (pushnew 'clear-initialized-p sb-ext:*save-hooks*)

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
cl-opengl-devel mailing list
cl-opengl-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cl-opengl-devel

Reply via email to