[cl-opengl-devel] Building cl-opengl require some changes in code.

Denis Rtveliashvili rtvd at mail.ru
Thu Apr 13 20:29:05 UTC 2006


I've managed to build the cl-opengl somehow, but it required some changes in code.

I am new to LISP and cl-opengl and I do not know what would be the best. Probably it is worth to change the cl-opengl a little?

So I would like to share my findings with you hoping that you'll find them useful.


1. It was necessary to declare the usage of GL and GLU before GLUT. Otherwise nothing compiled. I added the following lines to glu/library.lisp on my Linux box:

(define-foreign-library gl
  ((:not :darwin) (:default "libGL")))

(use-foreign-library gl)

and the following lines to glut/library.lisp:

(define-foreign-library gl
  (:unix (:or "libGL.so")))

(define-foreign-library glu
  (:unix (:or "libGLU.so")))

(use-foreign-library gl)
(use-foreign-library glu)



2. The gluCheckExtension definition did not compile. I had to change the line

(defcfun ("gluCheckExtension" check-extension) (:boolean gl:boolean)

to

(defcfun ("gluCheckExtension" check-extension) boolean

in the glu/glu.lisp file.



3. Running the GLUT demos showed that "gears" froze when I pressed ESC. Further investigation have shown that at least two methods which do not exist in standard GLUT are being used in the demo and the glut bindings. They are:

glutMainLoopEvent
glutLeaveMainLoop

According to http://freeglut.sourceforge.net/docs/api.php, they are a part of FreeGLUT and the original GLUT does not contain them.

Good luck!
rtvd



More information about the cl-opengl-devel mailing list