Update of /project/cello/cvsroot/cello/cl-ftgl
In directory clnet:/tmp/cvs-serv32313
Modified Files:
cl-ftgl.lisp
Log Message:
Changed: Loading of dynamic lib not done on toplevel anymore. Now only in function cl-ftgl-init.
Changed: #+test: Use font ArialHB instead of Sylfaen (Sylfaen does not exist on OS X by default).
Added: New function cl-ftgl-test.
--- /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp 2006/08/23 20:11:18 1.9
+++ /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp 2006/08/25 08:28:16 1.10
@@ -20,7 +20,7 @@
;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
;;; IN THE SOFTWARE.
-;;; $Header: /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp,v 1.9 2006/08/23 20:11:18 fgoenninger Exp $
+;;; $Header: /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp,v 1.10 2006/08/25 08:28:16 fgoenninger Exp $
(defpackage #:cl-ftgl
(:nicknames #:ftgl)
@@ -54,7 +54,8 @@
(:darwin (:or "/opt/common-lisp/cello/cl-ftgl/ftgl-int/libFTGLint.dylib"))
(:windows (:or "/0dev/user/dynlib/ftgl_dynamic_MTD_d.dll")))
-(use-foreign-library FTGL)
+;;(use-foreign-library FTGL) - frgo: This leads to problems on OS X !!!
+;; -> Use function cl-ftgl-init !
(defparameter *gui-style-default-face* 'sylfaen)
(defparameter *gui-style-button-face* 'sylfaen)
@@ -137,13 +138,23 @@
#+test
(progn
(cl-ftgl-init)
- (let ((sylfaen (ftgl-font-ensure :texture "Sylfaen" 24 96)))
- (print (list "sylfaen ascender" (ftgl-get-ascender sylfaen)))
- (print (list "sylfaen descender" (ftgl-get-descender sylfaen)))
- (print (list "sylfaen hello world length" (ftgl-string-length sylfaen "Hello world")))
- (print (list "sylfaen disp font" (ftgl-get-display-font sylfaen)))
+ (let ((sylfaen (ftgl-font-ensure :texture |ArialHB| 24 96)))
+ (print (list "ArialHB ascender" (ftgl-get-ascender sylfaen)))
+ (print (list "ArialHB descender" (ftgl-get-descender sylfaen)))
+ (print (list "ArialHB hello world length" (ftgl-string-length sylfaen "Hello world")))
+ (print (list "ArialHB disp font" (ftgl-get-display-font sylfaen)))
))
+#+frgo
+(defun cl-ftgl-test ()
+ (setf *ftgl-ogl* t)
+ (cl-ftgl-init)
+ (let ((sylfaen (ftgl-font-ensure :texture "ArialHB" 24 96)))
+ (print (list "ArialHB ascender" (ftgl-get-ascender sylfaen)))
+ (print (list "ArialHB descender" (ftgl-get-descender sylfaen)))
+ (print (list "ArialHB hello world length" (ftgl-string-length sylfaen "Hello world")))
+ (print (list "ArialHB disp font" (ftgl-get-display-font sylfaen)))))
+
(defun cl-ftgl-init ()
(unless *ftgl-loaded-p*
(assert (setq *ftgl-loaded-p* (use-foreign-library ftgl)))))
@@ -336,4 +347,3 @@
(defmethod font-bearing-x (font &optional text)
(declare (ignorable font text))
0)
-