summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2019-05-13 18:53:26 -0400
committerDavid Thompson <dthompson2@worcester.edu>2019-05-13 18:54:32 -0400
commitd50b423946b19fbef20f7fc42a4841b0dd8c3da3 (patch)
treed92c49306abf3dfb2ebd67e8264748e9def7466a
parent6c796a33c522622067ebd6cb853d8743d1787e73 (diff)
render: Replace broken refs to "typed buffer" with "buffer view".
* chickadee/render/asset.scm: s/typed-buffer/buffer-view/ * chickadee/render/particles.scm: Same.
-rw-r--r--chickadee/render/asset.scm20
-rw-r--r--chickadee/render/particles.scm82
2 files changed, 51 insertions, 51 deletions
diff --git a/chickadee/render/asset.scm b/chickadee/render/asset.scm
index bb774e8..44e7afc 100644
--- a/chickadee/render/asset.scm
+++ b/chickadee/render/asset.scm
@@ -233,16 +233,16 @@
(when (and (vector? min)
(not (= (vector-length min) (type-length type))))
(error "not enough elements for min" min type))
- (make-typed-buffer #:name name
- #:buffer view
- #:offset offset
- #:component-type component-type
- #:normalized? normalized?
- #:length length
- #:type type
- #:max max
- #:min min
- #:sparse sparse)))
+ (make-buffer-view #:name name
+ #:buffer view
+ #:offset offset
+ #:component-type component-type
+ #:normalized? normalized?
+ #:length length
+ #:type type
+ #:max max
+ #:min min
+ #:sparse sparse)))
(define (texture-filter n)
(match n
(9728 'nearest)
diff --git a/chickadee/render/particles.scm b/chickadee/render/particles.scm
index 9d15ecd..5afae81 100644
--- a/chickadee/render/particles.scm
+++ b/chickadee/render/particles.scm
@@ -155,49 +155,49 @@ void main (void) {
"))
(define (make-particles-vertex-array capacity width height texture buffer)
- (let* ((indices (make-typed-buffer #:type 'scalar
- #:component-type 'unsigned-int
- #:divisor 0
- #:buffer (make-buffer
- (u32vector 0 3 2 0 2 1)
- #:target 'index)))
- (verts (make-typed-buffer #:type 'vec2
- #:component-type 'float
- #:divisor 0
- #:buffer (make-buffer
- ;; TODO: use the texture
- ;; size in pixels.
- (let ((hw (/ width 2.0))
- (hh (/ height 2.0)))
- (f32vector (- hw) (- hh)
- hw (- hh)
- hw hh
- (- hw) hh))
- #:target 'vertex)))
- (tex (make-typed-buffer #:type 'vec2
- #:component-type 'float
- #:divisor 0
- #:buffer (make-buffer
- (let ((tex (texture-gl-tex-rect
- texture)))
- (f32vector 0 0
- 1 0
- 1 1
- 0 1))
- #:target 'vertex)))
- (pos (make-typed-buffer #:name "particle position buffer"
+ (let* ((indices (make-buffer-view #:type 'scalar
+ #:component-type 'unsigned-int
+ #:divisor 0
+ #:buffer (make-buffer
+ (u32vector 0 3 2 0 2 1)
+ #:target 'index)))
+ (verts (make-buffer-view #:type 'vec2
+ #:component-type 'float
+ #:divisor 0
+ #:buffer (make-buffer
+ ;; TODO: use the texture
+ ;; size in pixels.
+ (let ((hw (/ width 2.0))
+ (hh (/ height 2.0)))
+ (f32vector (- hw) (- hh)
+ hw (- hh)
+ hw hh
+ (- hw) hh))
+ #:target 'vertex)))
+ (tex (make-buffer-view #:type 'vec2
+ #:component-type 'float
+ #:divisor 0
+ #:buffer (make-buffer
+ (let ((tex (texture-gl-tex-rect
+ texture)))
+ (f32vector 0 0
+ 1 0
+ 1 1
+ 0 1))
+ #:target 'vertex)))
+ (pos (make-buffer-view #:name "particle position buffer"
+ #:buffer buffer
+ #:type 'vec2
+ #:component-type 'float
+ #:length capacity
+ #:divisor 1))
+ (life (make-buffer-view #:name "particle life remaining buffer"
#:buffer buffer
- #:type 'vec2
- #:component-type 'float
+ #:type 'scalar
+ #:component-type 'int
+ #:offset 24
#:length capacity
- #:divisor 1))
- (life (make-typed-buffer #:name "particle life remaining buffer"
- #:buffer buffer
- #:type 'scalar
- #:component-type 'int
- #:offset 24
- #:length capacity
- #:divisor 1)))
+ #:divisor 1)))
(make-vertex-array #:indices indices
#:attributes `((0 . ,verts)
(1 . ,tex)