[cello-cvs] CVS cello/kt-opengl

fgoenninger fgoenninger at common-lisp.net
Sun Oct 1 12:29:44 UTC 2006


Update of /project/cello/cvsroot/cello/kt-opengl
In directory clnet:/tmp/cvs-serv9432

Modified Files:
	kt-opengl.lisp 
Log Message:
Code cleanup.

--- /project/cello/cvsroot/cello/kt-opengl/kt-opengl.lisp	2006/08/28 21:45:27	1.6
+++ /project/cello/cvsroot/cello/kt-opengl/kt-opengl.lisp	2006/10/01 12:29:44	1.7
@@ -21,86 +21,88 @@
 ;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
 ;;; IN THE SOFTWARE.
 
-;;; $Id: kt-opengl.lisp,v 1.6 2006/08/28 21:45:27 ktilton Exp $
+;;; $Id: kt-opengl.lisp,v 1.7 2006/10/01 12:29:44 fgoenninger Exp $
 
 (pushnew :kt-opengl *features*)
 
 (defpackage #:kt-opengl
   (:nicknames #:ogl)
   (:use #:common-lisp #:cffi #:ffx)
-  (:export #:*ogl-listing-p*
-    #:glut-get-window 
-    #:glut-set-window 
-    #:glut-post-redisplay
+  (:export
+
+    #:kt-opengl-init
+    #:kt-opengl-reset
+    #:glec
+
+    #:*ogl-listing-p*
+    #:*selecting*
+
     #:with-matrix
     #:with-attrib
     #:with-client-attrib
     #:with-gl-begun 
+    #:with-gl-param
+    #:with-bitmap-shifted
+    #:with-gl-parami
+    #:with-gl-paramf
+    #:with-gl-paramd
+    #:with-gl-integers
+    #:with-gl-floats
+    #:with-gl-doubles
+    #:with-display-list
+    #:with-gl-translation
+
     #:gl-pushm 
     #:gl-popm
-    #:glut-callback-set 
-    #:kt-opengl-init 
+    
     #:closed-stream-p 
-    #:*selecting*
-    #:kt-opengl-reset
-    #:kt-opengl-set-home-dir
-    #:kt-opengl-get-home-dir
-    #:cl-glut-set-home-dir
-    #:cl-glut-get-home-dir
-    #:kt-opengl-set-gl-dll-filename
-    #:kt-opengl-get-gl-dll-filename
-    #:kt-opengl-set-glu-dll-filename
-    #:kt-opengl-get-glu-dll-filename
-    #:cl-glut-set-dll-filename
-    #:cl-glut-get-dll-filename
+
+    #:ncalc-normalf
+    #:ncalc-normalfv
+
+    #:ogl-get-int
+    #:ogl-get-boolean 
+
+    #:v3f
+    #:make-v3f
+    #:v3f-x
+    #:v3f-y
+    #:v3f-z
+
+    #:xlin
+    #:xlout
+    #:farther
+    #:nearer
+
+    #:texture-name
     #:ogl-texture
-    #:ncalc-normalf #:ncalc-normalfv #:ogl-get-int #:ogl-get-boolean 
-    #:v3f #:make-v3f #:v3f-x #:v3f-y #:v3f-z
-    #:with-gl-param #:xlin #:xlout
-    #:farther #:nearer
-    #:ogl-texture-delete #:ogl-texture-gen #:ogl-tex-gen-setup
-    #:ogl-bounds #:ogl-scissor-box #:ogl-raster-pos-get
-    #:ogl-pen-move #:with-bitmap-shifted
-    #:texture-name #:ogl-list-cache #:ogl-lists-delete
-    #:eltgli #:ogl-tex-activate #:gl-name #:glec
+    #:ogl-texture-gen
+    #:ogl-texture-delete
+    #:ogl-tex-gen-setup
+    #:ogl-tex-activate
+    
+    #:ogl-bounds
+    #:ogl-scissor-box
+    #:ogl-raster-pos-get
+
+    #:ogl-pen-move
+
+    #:ogl-list-cache
+    #:ogl-lists-delete
+
+    #:eltgli
+
+    #:gl-name
 
     #:gl-get-integers
     #:gl-get-floats
     #:gl-get-doubles
-    #:with-gl-parami
-    #:with-gl-paramf
-    #:with-gl-paramd
-    #:with-gl-integers
-    #:with-gl-floats
-    #:with-gl-doubles
-    #:with-display-list
     ))
 
 (in-package :kt-opengl)
 
 (defvar *selecting*)
 
-(defparameter *win32-opengl-loc* (namestring
-		   (make-pathname
-		    ;;#+lispworks :host #-lispworks :device "c"
-		    :directory '(:absolute "windows" "system32")
-		    :name "opengl32"
-		    :type "dll")))
-
-(defparameter *win32-glu-loc* (namestring
-		   (make-pathname
-		    ;;#+lispworks :host #-lispworks :device "c"
-		    :directory '(:absolute "windows" "system32")
-		    :name "opengl32"
-		    :type "dll")))
-
-(define-foreign-library OpenGL
-  (:windows (:or "/windows/system32/opengl32.dll"))
-  (:darwin (:or (:framework "OpenGL"))))
-
-(define-foreign-library GLU
-  (:windows (:or "/windows/system32/glu32.dll")))
-
 (defparameter *opengl-dll* nil)
 
 (defun kt-opengl-init ()
@@ -119,6 +121,13 @@
 (eval-when (:load-toplevel :execute)
   (kt-opengl-init))
 
+(defun kt-opengl-reset ()
+  (loop for ec = (glgeterror)
+        for n below 10
+        when (zerop ec) do (cells::trc "kt-opengl-reset sees zero error code")
+        (loop-finish)
+        do (cells::trc "kt-opengl-init sees error" ec)))
+
 (defun gl-boolean-test (value)
   #+allegro (not (eql value #\null))
   #-allegro (not (zerop value)))




More information about the Cello-cvs mailing list