Update of /project/cells/cvsroot/cell-cultures/cl-opengl
In directory common-lisp.net:/tmp/cvs-serv10251/cl-opengl
Modified Files:
cl-opengl.lisp cl-opengl.lpr gl-constants.lisp gl-def.lisp
gl-functions.lisp glut-extras.lisp glut-functions.lisp
nehe-14.lisp ogl-macros.lisp ogl-utils.lisp
Log Message:
No idea how the OpenGL stuff changed. Mostly bringing ffi-extender up to date.
Date: Tue Dec 14 04:53:09 2004
Author: ktilton
Index: cell-cultures/cl-opengl/cl-opengl.lisp
diff -u cell-cultures/cl-opengl/cl-opengl.lisp:1.5 cell-cultures/cl-opengl/cl-opengl.lisp:1.6
--- cell-cultures/cl-opengl/cl-opengl.lisp:1.5 Wed Nov 17 13:31:45 2004
+++ cell-cultures/cl-opengl/cl-opengl.lisp Tue Dec 14 04:53:05 2004
@@ -26,7 +26,7 @@
(defpackage #:cl-opengl
(:nicknames #:ogl)
- (:use #:common-lisp #:uffi #:ffx)
+ (:use #:common-lisp #:ffx)
(:export #:*ogl-listing-p*
#:glut-get-window
#:glut-set-window
Index: cell-cultures/cl-opengl/cl-opengl.lpr
diff -u cell-cultures/cl-opengl/cl-opengl.lpr:1.1 cell-cultures/cl-opengl/cl-opengl.lpr:1.2
--- cell-cultures/cl-opengl/cl-opengl.lpr:1.1 Sat Jun 26 20:38:40 2004
+++ cell-cultures/cl-opengl/cl-opengl.lpr Tue Dec 14 04:53:05 2004
@@ -1,4 +1,4 @@
-;; -*- lisp-version: "6.2 [Windows] (Jun 26, 2002 11:39)"; common-graphics: "1.389.2.105.2.14"; -*-
+;; -*- lisp-version: "6.2 [Windows] (Sep 3, 2004 12:04)"; common-graphics: "1.389.2.105.2.14"; -*-
(in-package :common-graphics-user)
@@ -18,7 +18,7 @@
(make-instance 'module :name "ogl-utils.lisp")
(make-instance 'module :name "nehe-14.lisp"))
:projects (list (make-instance 'project-module :name
- "..\\ffi-extender\\ffi-extender"))
+ "c:\\cell-cultures\\ffi-extender\\ffi-extender"))
:libraries nil
:distributed-files nil
:project-package-name :cl-opengl
Index: cell-cultures/cl-opengl/gl-constants.lisp
diff -u cell-cultures/cl-opengl/gl-constants.lisp:1.2 cell-cultures/cl-opengl/gl-constants.lisp:1.3
--- cell-cultures/cl-opengl/gl-constants.lisp:1.2 Fri Oct 15 05:37:55 2004
+++ cell-cultures/cl-opengl/gl-constants.lisp Tue Dec 14 04:53:05 2004
@@ -22,6 +22,7 @@
(in-package #:cl-opengl)
+
#| blendingfactordest |#
(dfc gl_zero 0)
(dfc gl_one 1)
Index: cell-cultures/cl-opengl/gl-def.lisp
diff -u cell-cultures/cl-opengl/gl-def.lisp:1.2 cell-cultures/cl-opengl/gl-def.lisp:1.3
--- cell-cultures/cl-opengl/gl-def.lisp:1.2 Fri Oct 1 06:01:29 2004
+++ cell-cultures/cl-opengl/gl-def.lisp Tue Dec 14 04:53:05 2004
@@ -28,6 +28,7 @@
;;(cells::count-it ,(intern (string-upcase name$) :keyword))
(glec ',(intern name$)))))
+
(defun aforef (o n)
(uffi:deref-array o '(:array :int) n))
Index: cell-cultures/cl-opengl/gl-functions.lisp
diff -u cell-cultures/cl-opengl/gl-functions.lisp:1.4 cell-cultures/cl-opengl/gl-functions.lisp:1.5
--- cell-cultures/cl-opengl/gl-functions.lisp:1.4 Thu Oct 28 02:09:33 2004
+++ cell-cultures/cl-opengl/gl-functions.lisp Tue Dec 14 04:53:05 2004
@@ -25,7 +25,6 @@
(defparameter *ogl-listing-p* nil)
(defun-ogl :void "open-gl" "glFlush" ())
-
(defun-ogl :void "open-gl" "glMaterialfv" (glenum face glenum pname glfloat *params))
Index: cell-cultures/cl-opengl/glut-extras.lisp
diff -u cell-cultures/cl-opengl/glut-extras.lisp:1.3 cell-cultures/cl-opengl/glut-extras.lisp:1.4
--- cell-cultures/cl-opengl/glut-extras.lisp:1.3 Fri Oct 15 05:37:55 2004
+++ cell-cultures/cl-opengl/glut-extras.lisp Tue Dec 14 04:53:05 2004
@@ -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* (uffi:load-foreign-library *glut-dynamic-lib*
+ (assert (setq *glut-dll* (ffx: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 (uffi:make-null-pointer '(:array :cstring)))
+ (glut-init argc (ffx:make-null-pointer '(:array :cstring)))
(print "glut initialised")
)
(fgn-free argc))))
@@ -73,13 +73,13 @@
(or (not (zerop (glgeterror)))
(zerop w))))
-(let ((mm (uffi:allocate-foreign-object :int 1)))
+(let ((mm (ffx:allocate-foreign-object :int 1)))
(defun get-matrix-mode ()
(glgetintegerv gl_matrix_mode mm)
(uffi:deref-array mm '(:array :int) 0)))
-(let ((mm (uffi:allocate-foreign-object :int 1))
- (sd (uffi:allocate-foreign-object :int 1)))
+(let ((mm (ffx:allocate-foreign-object :int 1))
+ (sd (ffx: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 (uffi:allocate-foreign-object :int 1))
+ (let ((mm (ffx: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)))
- (uffi::free-foreign-object mm)))))
+ (ffx: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.2 cell-cultures/cl-opengl/glut-functions.lisp:1.3
--- cell-cultures/cl-opengl/glut-functions.lisp:1.2 Wed Nov 17 13:31:45 2004
+++ cell-cultures/cl-opengl/glut-functions.lisp Tue Dec 14 04:53:05 2004
@@ -70,10 +70,13 @@
(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)
- (:export mgwclose #:freeg #:glut-bitmap-string #:glut-stroke-string))
+ (:export #:mgwclose #:freeg #:glut-bitmap-string #:glut-stroke-string))
(defun freeg () t)
Index: cell-cultures/cl-opengl/nehe-14.lisp
diff -u cell-cultures/cl-opengl/nehe-14.lisp:1.2 cell-cultures/cl-opengl/nehe-14.lisp:1.3
--- cell-cultures/cl-opengl/nehe-14.lisp:1.2 Fri Oct 15 05:37:55 2004
+++ cell-cultures/cl-opengl/nehe-14.lisp Tue Dec 14 04:53:05 2004
@@ -114,13 +114,13 @@
(glut-init-window-size 640 480) ;; Window Size If We Start In Windowed Mode
(let ((key "NeHe's OpenGL Framework"))
- (uffi:with-cstring (key-native key)
+ (ffx: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)
Index: cell-cultures/cl-opengl/ogl-macros.lisp
diff -u cell-cultures/cl-opengl/ogl-macros.lisp:1.3 cell-cultures/cl-opengl/ogl-macros.lisp:1.4
--- cell-cultures/cl-opengl/ogl-macros.lisp:1.3 Fri Oct 15 05:37:55 2004
+++ cell-cultures/cl-opengl/ogl-macros.lisp Tue Dec 14 04:53:05 2004
@@ -102,11 +102,11 @@
(declare (ignorable load-oglfont-p))
(unless *opengl-dll*
(print "loading open GL/GLU")
- (uffi:load-foreign-library
+ (ffx:load-foreign-library
*gl-dynamic-lib*
:module "open-gl")
;; -lispworks#-lispworks
- (setf *opengl-dll* (uffi:load-foreign-library *glu-dynamic-lib*
+ (setf *opengl-dll* (ffx: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.5 cell-cultures/cl-opengl/ogl-utils.lisp:1.6
--- cell-cultures/cl-opengl/ogl-utils.lisp:1.5 Thu Oct 28 02:09:33 2004
+++ cell-cultures/cl-opengl/ogl-utils.lisp Tue Dec 14 04:53:05 2004
@@ -139,7 +139,7 @@
;;(cells::count-it :normalize-3f)
(values (+ (/ x m)) (+ (/ y m)) (+ (/ z m)))))))
-(uffi:def-foreign-type bool* (* glboolean))
+(ffx: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))))
-(uffi:def-foreign-type glint* (* glint))
+(ffx:def-foreign-type glint* (* glint))
#-lispworks
(declaim (type glint* *ogl-int*))