[cello-cvs] CVS cello/cl-ftgl
ktilton
ktilton at common-lisp.net
Thu Jul 6 22:09:11 UTC 2006
Update of /project/cello/cvsroot/cello/cl-ftgl
In directory clnet:/tmp/cvs-serv9972/cl-ftgl
Modified Files:
cl-ftgl.lisp
Log Message:
--- /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp 2006/07/03 00:35:12 1.5
+++ /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp 2006/07/06 22:09:11 1.6
@@ -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.5 2006/07/03 00:35:12 ktilton Exp $
+;;; $Header: /project/cello/cvsroot/cello/cl-ftgl/cl-ftgl.lisp,v 1.6 2006/07/06 22:09:11 ktilton Exp $
(defpackage #:cl-ftgl
(:nicknames #:ftgl)
@@ -51,7 +51,7 @@
(in-package :cl-ftgl)
(define-foreign-library FTGL
- (:darwin (:framework "FTGL"))
+ (:darwin (:or (:framework "FTGL") "libftgl.dylib"))
(:windows (:or "/0dev/user/dynlib/ftgl_dynamic_MTD_d.dll")))
(use-foreign-library FTGL)
@@ -177,8 +177,12 @@
ft-metrics
ifont)
+(defun ftgl-assert-opengl-context ()
+ ;; use when debugging FTGL being hit before opengl context estanblished (assert *ftgl-ogl*)
+ )
+
(defun ftgl-char-width (f c)
- (assert *ftgl-ogl*)
+ (ftgl-assert-opengl-context)
(or (aref (ftgl-widths f) (char-code c))
(setf (aref (ftgl-widths f) (char-code c))
(ftgl-string-length f (string c)))))
@@ -220,19 +224,19 @@
(xftgl)
(defun ftgl-get-ascender (font)
- (assert *ftgl-ogl*)
+ (ftgl-assert-opengl-context)
(or (ftgl-ascender font)
(setf (ftgl-ascender font)
(fgc-ascender (ftgl-get-metrics-font font)))))
(defun ftgl-get-descender (font)
- (assert *ftgl-ogl*)
+ (ftgl-assert-opengl-context)
(or (ftgl-descender font)
(setf (ftgl-descender font)
(fgc-descender (ftgl-get-metrics-font font)))))
(defun ftgl-height (f)
- (assert *ftgl-ogl*)
+ (ftgl-assert-opengl-context)
(- (ftgl-get-ascender f)
(ftgl-get-descender f)))
More information about the Cello-cvs
mailing list