[cl-opengl-devel] Incorrect re-initialization of cl-glut on image loading
Kalyanov Dmitry
kalyanov.dmitry at gmail.com
Sat Sep 12 23:59:20 UTC 2009
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*)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <https://mailman.common-lisp.net/pipermail/cl-opengl-devel/attachments/20090913/2f5c7d9b/attachment.sig>
More information about the cl-opengl-devel
mailing list