render: Replace broken refs to "typed buffer" with "buffer view".
authorDavid Thompson <dthompson2@worcester.edu>
Mon, 13 May 2019 22:53:26 +0000 (18:53 -0400)
committerDavid Thompson <dthompson2@worcester.edu>
Mon, 13 May 2019 22:54:32 +0000 (18:54 -0400)
* chickadee/render/asset.scm: s/typed-buffer/buffer-view/
* chickadee/render/particles.scm: Same.

chickadee/render/asset.scm
chickadee/render/particles.scm

index bb774e8..44e7afc 100644 (file)
       (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)
index 9d15ecd..5afae81 100644 (file)
@@ -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)