diff options
author | David Thompson <dthompson@member.fsf.org> | 2013-08-18 09:05:10 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2013-08-18 09:05:10 -0400 |
commit | cf82f90d852e7ba0478aaf7480ba5914edc02be5 (patch) | |
tree | 2cd8e3bcfd61e68908b25ce0a25cac92dd79875b /2d | |
parent | e30c95377f4bf1bac3a97c45ecd849b3119fe2cd (diff) |
Change render-font to draw-font and don't any matrix or color manipulation.
Diffstat (limited to '2d')
-rw-r--r-- | 2d/font.scm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/2d/font.scm b/2d/font.scm index 4aef6da..404272b 100644 --- a/2d/font.scm +++ b/2d/font.scm @@ -40,18 +40,17 @@ (size font-size)) (define (load-font filename size) + "Loads a font from a file with a given size in points." (let ((ftgl-font (ftgl-create-texture-font filename))) ;; Hardcoded 72 dpi for now. (ftgl-set-font-face-size ftgl-font size 72) (make-font ftgl-font size))) -(define (render-font font text x y color alignment) - (with-gl-push-matrix - (gl-translate x y 0) - (apply-color color) - (ftgl-render-font (font-ftgl-font font) - text - (ftgl-render-mode all)))) +(define (draw-font font text) + "Renders the string text using the given font." + (ftgl-render-font (font-ftgl-font font) + text + (ftgl-render-mode all))) (export <font> make-font @@ -59,7 +58,7 @@ font-ftgl-font font-size load-font - render-font) + draw-font) ;;; ;;; Textbox |