[cl-opengl-devel] Fun GPLed Common Lisp OpenGL Molecule Viewer

Charlie McMackin charliemac+cl-opengl at gmail.com
Wed Dec 19 23:11:40 UTC 2007


I think if you changed your mouse code a tad it wouldn't cons so much
while mousing;

(defvar origclick (cons 0 0))
(defvar origrot (cons 0.0 0.0))

(defmethod glut:mouse ((window mol-window) button state x y)
  (when (eq button :left-button)
      (when (eq state :down)
	  (setf (car origrot) view-rotx
		   (cdr origrot) view-roty
		   (car origclick) x
		   (cdr origclick) y))))

I didn't test the above code at all but it should work and apologies
for any formatting nastiness that gmail might add. Finally, you'll
have to change all the cadr references to cdr for all the methods
using origclick and origrot

Charlie Mac



More information about the cl-opengl-devel mailing list