summaryrefslogtreecommitdiff
path: root/sly/render
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-04-05 19:46:26 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-04-05 19:49:36 -0400
commit076a01c36d01c71ffcce1737855b2928bc6165bc (patch)
treeb41de0b8edf27ee050a393ca47e5aa1a1130b263 /sly/render
parent9ddc407ced2d57b716002711492133e048d4fa53 (diff)
render: model: Prefix procedures with 'model-'.
* sly/render/model.scm (paint, blend, group, group*, move, place): Renamed. (model-paint, model-blend, model-group, list->model, model-move, model-place): New procedures. * README.org (Example): s/move/model-move/ * examples/2048/2048.scm: Update example. * examples/mines/mines.scm: Likewise. * examples/animation.scm: Likewise. * examples/font.scm: Likewise. * examples/joystick.scm: Likewise. * examples/simple.scm: Likewise. * examples/tilemap.scm: Likewise.
Diffstat (limited to 'sly/render')
-rw-r--r--sly/render/model.scm23
1 files changed, 14 insertions, 9 deletions
diff --git a/sly/render/model.scm b/sly/render/model.scm
index fdda5ed..2686d8c 100644
--- a/sly/render/model.scm
+++ b/sly/render/model.scm
@@ -43,7 +43,12 @@
model-mesh model-transform model-texture model-shader model-color
model-blend-mode model-depth-test? model-children
draw-model
- paint blend group group* move place))
+ model-paint
+ model-blend
+ model-group
+ list->model
+ model-move
+ model-place))
;; Representation of a single OpenGL render call.
(define-record-type <model>
@@ -160,29 +165,29 @@ CONTEXT."
;;; Utility Procedures
;;;
-(define (paint color model)
+(define (model-paint color model)
"Create a copy of MODEL, but with a new COLOR."
(model-inherit model #:color color))
-(define (blend blend-mode model)
+(define (model-blend blend-mode model)
"Create a copy of MODEL, but with a new BLEND-MODE."
(model-inherit model #:blend-mode blend-mode))
-(define (group . children)
- "Create a new group containing the list of CHILDREN."
+(define (model-group . children)
+ "Create a new compound model containing the list of CHILDREN."
(make-model #:children children))
-(define (group* children)
- "Create a new group containing the list of CHILDREN."
+(define (list->model children)
+ "Create a new compound model containing the list of CHILDREN."
(make-model #:children children))
-(define (move position model)
+(define (model-move position model)
"Create a new group in which the list of CHILDREN are translated by
the vector POSITION."
(model-inherit model #:transform (transform* (model-transform model)
(translate position))))
-(define (place transform model)
+(define (model-place transform model)
"Create a new group in which the tranformation matrices of the
CHILDREN are multiplied by TRANSFORM."
(model-inherit model #:transform (transform* (model-transform model)