diff options
author | David Thompson <dthompson@member.fsf.org> | 2013-08-27 18:44:46 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2013-08-27 18:44:46 -0400 |
commit | 776cd81c2fb923d934bab3686d61fbdcc8f8ab7f (patch) | |
tree | 910b5c6d6346aec64961763ab4d7d2b8e60c6f17 | |
parent | cd9a3d80d8443b4e9a2fbab8f15235fd91e69052 (diff) |
Rename apply-color to use-color.
-rw-r--r-- | 2d/color.scm | 6 | ||||
-rw-r--r-- | 2d/font.scm | 2 | ||||
-rw-r--r-- | examples/font.scm | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/2d/color.scm b/2d/color.scm index 2e7cba9..e23d493 100644 --- a/2d/color.scm +++ b/2d/color.scm @@ -32,7 +32,7 @@ color-g color-b color-a - apply-color + use-color rgba rgb white @@ -50,13 +50,15 @@ (b color-b) (a color-a)) -(define (apply-color color) +(define (use-color color) + "Sets the current OpenGL color." (gl-color (color-r color) (color-g color) (color-b color) (color-a color))) (define (color-component color-code offset) + "Returns the value of a color channel in the range [0,1]." (let ((mask (ash #xff offset))) (/ (ash (logand mask color-code) (- offset)) diff --git a/2d/font.scm b/2d/font.scm index 182f25b..cb83b1d 100644 --- a/2d/font.scm +++ b/2d/font.scm @@ -98,7 +98,7 @@ upper-left corner rather than the bottom-left." (with-gl-push-matrix (vector2-translate (textbox-position textbox)) (flip-text (textbox-font textbox)) - (apply-color (textbox-color textbox)) + (use-color (textbox-color textbox)) (ftgl-render-layout (textbox-layout textbox) (textbox-text textbox) (ftgl-render-mode all)))) diff --git a/examples/font.scm b/examples/font.scm index 69da60a..680d4e6 100644 --- a/examples/font.scm +++ b/examples/font.scm @@ -27,7 +27,7 @@ (define (render) (let ((fps (floor (inexact->exact (current-fps))))) (with-gl-push-matrix - (apply-color white) + (use-color white) (draw-font font (format #f "FPS: ~d" fps)))) (draw-textbox textbox)) |