Update of /project/cells/cvsroot/cell-cultures/cl-opengl
In directory common-lisp.net:/tmp/cvs-serv12564/cl-opengl
Modified Files:
cl-opengl.lisp cl-opengl.lpr glut-extras.lisp
glut-functions.lisp nehe-14.lisp ogl-macros.lisp
ogl-utils.lisp
Log Message:
Cello cleanup, but mostly "removing" ffi-extender, which really lives on as the "hello-c" package
Date: Fri Apr 8 11:11:19 2005
Author: ktilton
Index: cell-cultures/cl-opengl/cl-opengl.lisp
diff -u cell-cultures/cl-opengl/cl-opengl.lisp:1.6 cell-cultures/cl-opengl/cl-opengl.lisp:1.7
--- cell-cultures/cl-opengl/cl-opengl.lisp:1.6 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/cl-opengl.lisp Fri Apr 8 11:11:19 2005
@@ -65,14 +65,6 @@
(in-package :cl-opengl)
-(defparameter *gl-dynamic-lib* :unconfigured)
-(defparameter *glu-dynamic-lib* :unconfigured)
-(defparameter *glut-dynamic-lib* :unconfigured)
-
-(eval-when (compile load)
- (load (merge-pathnames "cl-opengl-config"
- cl-user::*cell-cultures-config*)))
-
(defparameter *opengl-dll* nil)
(defun gl-boolean-test (value)
Index: cell-cultures/cl-opengl/cl-opengl.lpr
diff -u cell-cultures/cl-opengl/cl-opengl.lpr:1.2 cell-cultures/cl-opengl/cl-opengl.lpr:1.3
--- cell-cultures/cl-opengl/cl-opengl.lpr:1.2 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/cl-opengl.lpr Fri Apr 8 11:11:19 2005
@@ -1,12 +1,12 @@
-;; -*- lisp-version: "6.2 [Windows] (Sep 3, 2004 12:04)"; common-graphics: "1.389.2.105.2.14"; -*-
+;; -*- lisp-version: "7.0 [Windows] (Apr 6, 2005 17:03)"; cg: "1.54.2.17"; -*-
-(in-package :common-graphics-user)
+(in-package :cg-user)
-(defpackage :cl-opengl (:export))
+(defpackage :CL-OPENGL)
(define-project :name :cl-opengl
- :application-type (intern "Standard EXE" (find-package :keyword))
- :modules (list (make-instance 'module :name "cl-opengl.lisp")
+ :modules (list (make-instance 'module :name "cl-opengl-config.lisp")
+ (make-instance 'module :name "cl-opengl.lisp")
(make-instance 'module :name "gl-def.lisp")
(make-instance 'module :name "gl-constants.lisp")
(make-instance 'module :name "gl-functions.lisp")
@@ -18,24 +18,15 @@
(make-instance 'module :name "ogl-utils.lisp")
(make-instance 'module :name "nehe-14.lisp"))
:projects (list (make-instance 'project-module :name
- "c:\\cell-cultures\\ffi-extender\\ffi-extender"))
+ "c:\\cell-cultures\\hello-c\\hello-c"))
:libraries nil
:distributed-files nil
+ :internally-loaded-files nil
:project-package-name :cl-opengl
:main-form nil
:compilation-unit t
:verbose nil
- :runtime-modules '(:cg :drag-and-drop :lisp-widget
- :multi-picture-button :common-control
- :edit-in-place :outline :grid :group-box
- :header-control :progress-indicator-control
- :common-status-bar :tab-control :trackbar-control
- :up-down-control :dde :mci :carets :hotspots
- :menu-selection :choose-list :directory-list
- :color-dialog :find-dialog :font-dialog
- :string-dialog :yes-no-list-dialog
- :list-view-control :rich-edit :drawable :ole :www
- :aclwin302)
+ :runtime-modules nil
:splash-file-module (make-instance 'build-module :name "")
:icon-file-module (make-instance 'build-module :name "")
:include-flags '(:compiler :top-level :local-name-info)
@@ -43,6 +34,7 @@
:autoload-warning t
:full-recompile-for-runtime-conditionalizations nil
:default-command-line-arguments "+cx +t \"Initializing\""
+ :additional-build-lisp-image-arguments '(:read-init-files nil)
:old-space-size 256000
:new-space-size 6144
:runtime-build-option :standard
Index: cell-cultures/cl-opengl/glut-extras.lisp
diff -u cell-cultures/cl-opengl/glut-extras.lisp:1.4 cell-cultures/cl-opengl/glut-extras.lisp:1.5
--- cell-cultures/cl-opengl/glut-extras.lisp:1.4 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/glut-extras.lisp Fri Apr 8 11:11:19 2005
@@ -43,7 +43,7 @@
(cl-opengl-init)
(unless *glut-dll*
(print (list "loading GLUT" *glut-dynamic-lib* (probe-file *glut-dynamic-lib*)))
- (assert (setq *glut-dll* (ffx:load-foreign-library *glut-dynamic-lib*
+ (assert (setq *glut-dll* (uffi:load-foreign-library *glut-dynamic-lib*
:force-load #+lispworks nil #-lispworks t
:module "glut"))
() "Unable to load GLUT from: ~a" *glut-dynamic-lib* ))
@@ -57,7 +57,7 @@
(setf (eltf argc 0) 0)
(unwind-protect
(progn
- (glut-init argc (ffx:make-null-pointer '(:array :cstring)))
+ (glut-init argc (uffi:make-null-pointer '(:array :cstring)))
(print "glut initialised")
)
(fgn-free argc))))
@@ -73,13 +73,13 @@
(or (not (zerop (glgeterror)))
(zerop w))))
-(let ((mm (ffx:allocate-foreign-object :int 1)))
+(let ((mm (uffi:allocate-foreign-object :int 1)))
(defun get-matrix-mode ()
(glgetintegerv gl_matrix_mode mm)
(uffi:deref-array mm '(:array :int) 0)))
-(let ((mm (ffx:allocate-foreign-object :int 1))
- (sd (ffx:allocate-foreign-object :int 1)))
+(let ((mm (uffi:allocate-foreign-object :int 1))
+ (sd (uffi:allocate-foreign-object :int 1)))
(defun get-stack-depth ()
(glgetintegerv gl_matrix_mode mm)
(let ((mmi (uffi:deref-array mm '(:array :int) 0)))
@@ -93,7 +93,7 @@
(uffi:deref-array sd '(:array :int) 0))))
(defun cello-matrix-mode (&optional (tag :anon))
- (let ((mm (ffx:allocate-foreign-object :int 1))
+ (let ((mm (uffi:allocate-foreign-object :int 1))
)
(glgetintegerv gl_matrix_mode mm)
(let ((mmi (uffi:deref-array mm '(:array :int) 0)))
@@ -104,7 +104,7 @@
((eql mmi gl_texture) :texture)
(t (break "gl-stack-depth> unexpected matrix mode ~a ~a" tag mmi)))
- (ffx:free-foreign-object mm)))))
+ (uffi:free-foreign-object mm)))))
(defun glut-stroke-string (font string)
"Font must already have been converted to a pointer, string must be Lisp string"
Index: cell-cultures/cl-opengl/glut-functions.lisp
diff -u cell-cultures/cl-opengl/glut-functions.lisp:1.3 cell-cultures/cl-opengl/glut-functions.lisp:1.4
--- cell-cultures/cl-opengl/glut-functions.lisp:1.3 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/glut-functions.lisp Fri Apr 8 11:11:19 2005
@@ -70,9 +70,6 @@
(ff-defun-callable :cdecl :void mgwclose ()
(print "closing callback entered"))
-(FF:DEFUN-FOREIGN-CALLABLE MGWCLOSE (:VOID) (DECLARE (:CONVENTION :C))
- (PRINT "closing callback entered"))
-
(defpackage #:cl-opengl
(:nicknames #:ogl)
(:use)
Index: cell-cultures/cl-opengl/nehe-14.lisp
diff -u cell-cultures/cl-opengl/nehe-14.lisp:1.3 cell-cultures/cl-opengl/nehe-14.lisp:1.4
--- cell-cultures/cl-opengl/nehe-14.lisp:1.3 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/nehe-14.lisp Fri Apr 8 11:11:19 2005
@@ -96,7 +96,7 @@
(let ((msg (format nil "Hello, ~a ~a" (round (glut-stroke-height (ffi-glut-id id)))
stroke-font)))
- (with-cstring (cc msg)
+ (uffi:with-cstring (cc msg)
(glut-stroke-string (ffi-glut-id id) msg)
(gl-translatef (- (glut-stroke-length (ffi-glut-id id) cc))
0 0))))))
@@ -114,13 +114,13 @@
(glut-init-window-size 640 480) ;; Window Size If We Start In Windowed Mode
(let ((key "NeHe's OpenGL Framework"))
- (ffx:with-cstring (key-native key)
+ (uffi:with-cstring (key-native key)
(glut-create-window key-native)))
;(init) ; // Our Initialization
;; Set up the callbacks in OpenGL/GLUT
(glut-display-func (ff-register-callable dispfunc))
- (glut-wm-close-func (ff-register-callable mgwclose))
+ (glut-wm-close-func (ff-register-callable 'mgwclose))
(glut-keyboard-func (ff-register-callable 'mgwkey))
(gl-matrix-mode gl_projection)
@@ -145,7 +145,7 @@
#+test
(lesson-14)
-(ff-defun-callable :cdecl :void mgwkey (k x y)
+(ff-defun-callable :cdecl :void mgwkey ((k :int) (x :int) (y :int))
(print 'bingo)
(mgwkeyi k x y))
Index: cell-cultures/cl-opengl/ogl-macros.lisp
diff -u cell-cultures/cl-opengl/ogl-macros.lisp:1.4 cell-cultures/cl-opengl/ogl-macros.lisp:1.5
--- cell-cultures/cl-opengl/ogl-macros.lisp:1.4 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/ogl-macros.lisp Fri Apr 8 11:11:19 2005
@@ -102,11 +102,11 @@
(declare (ignorable load-oglfont-p))
(unless *opengl-dll*
(print "loading open GL/GLU")
- (ffx:load-foreign-library
+ (uffi:load-foreign-library
*gl-dynamic-lib*
:module "open-gl")
;; -lispworks#-lispworks
- (setf *opengl-dll* (ffx:load-foreign-library *glu-dynamic-lib*
+ (setf *opengl-dll* (uffi:load-foreign-library *glu-dynamic-lib*
:module "gl-util"))))
(defun glec (&optional (id :anon))
Index: cell-cultures/cl-opengl/ogl-utils.lisp
diff -u cell-cultures/cl-opengl/ogl-utils.lisp:1.6 cell-cultures/cl-opengl/ogl-utils.lisp:1.7
--- cell-cultures/cl-opengl/ogl-utils.lisp:1.6 Tue Dec 14 04:53:05 2004
+++ cell-cultures/cl-opengl/ogl-utils.lisp Fri Apr 8 11:11:19 2005
@@ -139,7 +139,7 @@
;;(cells::count-it :normalize-3f)
(values (+ (/ x m)) (+ (/ y m)) (+ (/ z m)))))))
-(ffx:def-foreign-type bool* (* glboolean))
+(uffi:def-foreign-type bool* (* glboolean))
#-lispworks
(declaim (type bool* *ogl-boolean*))
@@ -151,7 +151,7 @@
(gl-get-booleanv gl-code *ogl-boolean*)
(not (zerop (uffi:deref-array *ogl-boolean* '(:array glboolean) 0))))
-(ffx:def-foreign-type glint* (* glint))
+(uffi:def-foreign-type glint* (* glint))
#-lispworks
(declaim (type glint* *ogl-int*))