[bind-uniform-struct] ( value>>-quot type texture-unit name dim -- texture-unit' quot )


Vocabulary
gpu.render.private

Inputs and outputs
value>>-quotan object
typean object
texture-unitan object
namean object
diman object
texture-unit'an object
quotan object


Definition


:: [bind-uniform-struct]
( value>>-quot type texture-unit name dim -- texture-unit' quot )
dim [
<iota>
[ [ [ swap nth ] swap prefix ] map ]
[ [ number>string name "[" append "]." surround ] map ]
bi
] [ { [ ] } name "." append 1array ] if*
:> ( quot-prefixes name-prefixes ) type
all-uniform-tuple-slots :> uniforms texture-unit
quot-prefixes name-prefixes [| quot-prefix name-prefix |
uniforms name-prefix [bind-uniform-tuple]
quot-prefix prepend
] 2map
:> ( texture-unit' value-cleave ) texture-unit' value>>-quot
{ value-cleave 2cleave } append ;