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*)