summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-03-09 08:57:29 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-03-09 08:58:42 -0400
commite0ccd9ff37ac89be53836abe01f1eabc982ff90e (patch)
treee621a6e4db9767e4e0a384cd2f40d187badf0657
parentd84bb24d2359be9c4be7b3e4f05caf3daf68f243 (diff)
render: Remove shader argument from sprite and label constructors.
* sly/render/font.scm (make-label): Remove 'shader' keyword argument. * sly/render/sprite.scm (make-sprite): Likewise.
-rw-r--r--sly/render/font.scm6
-rw-r--r--sly/render/sprite.scm16
2 files changed, 7 insertions, 15 deletions
diff --git a/sly/render/font.scm b/sly/render/font.scm
index 43c3ecd..dff74a2 100644
--- a/sly/render/font.scm
+++ b/sly/render/font.scm
@@ -34,7 +34,6 @@
#:use-module (sly render color)
#:use-module (sly config)
#:use-module (sly render mesh)
- #:use-module (sly render shader)
#:use-module (sly render sprite)
#:use-module (sly render texture)
#:export (enable-fonts
@@ -97,9 +96,8 @@ HEIGHT, 32 bit color bytevector."
(bytevector->texture pixels width height 'linear 'linear)))
(define* (make-label font text #:optional #:key
- (anchor 'top-left)
- (shader (load-default-shader)))
+ (anchor 'top-left))
(let ((texture (render-text font text)))
- (make-sprite texture #:shader shader #:anchor anchor)))
+ (make-sprite texture #:anchor anchor)))
(define label make-label)
diff --git a/sly/render/sprite.scm b/sly/render/sprite.scm
index 9f06f56..d0ba059 100644
--- a/sly/render/sprite.scm
+++ b/sly/render/sprite.scm
@@ -35,7 +35,6 @@
#:use-module (sly math)
#:use-module (sly render mesh)
#:use-module (sly render model)
- #:use-module (sly render shader)
#:use-module (sly render texture)
#:use-module (sly math vector)
#:export (make-sprite sprite load-sprite))
@@ -45,11 +44,9 @@
;;;
(define* (make-sprite texture #:optional #:key
- (shader (load-default-shader))
(anchor 'center))
"Return a 2D rectangular mesh that displays the image TEXTURE. The
-size of the mesh is the size of TEXTURE, in pixels. Optionally, a
-custom SHADER can be specified."
+size of the mesh is the size of TEXTURE, in pixels."
(let* ((anchor (anchor-texture texture anchor))
(x1 (- (floor (vx anchor))))
(y1 (- (floor (vy anchor))))
@@ -70,15 +67,12 @@ custom SHADER can be specified."
(vector2 s2 t1)
(vector2 s2 t2)
(vector2 s1 t2)))))
- (make-model #:shader shader
- #:texture texture
+ (make-model #:texture texture
#:mesh mesh
#:depth-test? #f)))
(define sprite make-sprite)
-(define* (load-sprite file-name #:optional #:key (shader (load-default-shader))
- (anchor 'center))
- "Return a sprite mesh for the texture loaded from FILE-NAME.
-Optionally, a custom SHADER can be specified."
- (make-sprite (load-texture file-name) #:shader shader #:anchor anchor))
+(define* (load-sprite file-name #:key (anchor 'center))
+ "Return a sprite mesh for the texture loaded from FILE-NAME."
+ (make-sprite (load-texture file-name) #:anchor anchor))