1 USING: accessors combinators gpu.render gpu.render.private kernel sequences tools.test ;
4 UNIFORM-TUPLE: two-textures
5 { "argyle" texture-uniform f }
6 { "thread-count" float-uniform f }
7 { "tweed" texture-uniform f } ;
9 UNIFORM-TUPLE: inherited-textures < two-textures
10 { "paisley" texture-uniform f } ;
12 UNIFORM-TUPLE: array-of-textures < two-textures
13 { "plaids" texture-uniform 4 } ;
15 UNIFORM-TUPLE: struct-containing-texture
16 { "threads" two-textures f } ;
18 UNIFORM-TUPLE: array-of-struct-containing-texture
19 { "threads" inherited-textures 3 } ;
21 UNIFORM-TUPLE: array-of-struct-containing-array-of-texture
22 { "threads" array-of-textures 2 } ;
24 [ 1 ] [ texture-uniform uniform-type-texture-units ] unit-test
25 [ 0 ] [ float-uniform uniform-type-texture-units ] unit-test
26 [ 2 ] [ two-textures uniform-type-texture-units ] unit-test
27 [ 3 ] [ inherited-textures uniform-type-texture-units ] unit-test
28 [ 6 ] [ array-of-textures uniform-type-texture-units ] unit-test
29 [ 2 ] [ struct-containing-texture uniform-type-texture-units ] unit-test
30 [ 9 ] [ array-of-struct-containing-texture uniform-type-texture-units ] unit-test
31 [ 12 ] [ array-of-struct-containing-array-of-texture uniform-type-texture-units ] unit-test
33 [ { [ ] } ] [ texture-uniform f uniform-texture-accessors ] unit-test
35 [ { } ] [ float-uniform f uniform-texture-accessors ] unit-test
37 [ { [ argyle>> ] [ tweed>> ] } ] [ two-textures f uniform-texture-accessors ] unit-test
39 [ { [ argyle>> ] [ tweed>> ] [ paisley>> ] } ]
40 [ inherited-textures f uniform-texture-accessors ] unit-test
51 } ] [ array-of-textures f uniform-texture-accessors ] unit-test
58 } ] [ struct-containing-texture f uniform-texture-accessors ] unit-test
78 } ] [ array-of-struct-containing-texture f uniform-texture-accessors ] unit-test
103 } ] [ array-of-struct-containing-array-of-texture f uniform-texture-accessors ] unit-test
107 [ argyle>> 0 (bind-texture-unit) ]
108 [ tweed>> 1 (bind-texture-unit) ]
110 [ 0 swap nth 2 (bind-texture-unit) ]
111 [ 1 swap nth 3 (bind-texture-unit) ]
112 [ 2 swap nth 4 (bind-texture-unit) ]
113 [ 3 swap nth 5 (bind-texture-unit) ]
116 ] ] [ array-of-textures [bind-uniform-textures] ] unit-test