#N canvas 651 236 1145 664 10;
#X declare -lib Gem;
#N canvas 640 443 450 300 fps 0;
#X obj 60 28 gemhead;
#X obj 60 68 realtime;
#X obj 60 48 t b b;
#X obj 60 130 /;
#X msg 60 110 1000 \$1;
#X obj 60 235 outlet;
#X obj 60 152 + 0.5;
#X obj 60 214 i;
#N canvas 3 119 450 300 iir 0;
#X obj 63 31 inlet;
#X obj 63 81 +;
#X obj 63 107 / 21;
#X obj 119 138 * 20;
#X obj 63 176 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 1 1;
#X restore 60 182 pd iir;
#X connect 0 0 2 0;
#X connect 1 0 4 0;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 6 0;
#X connect 4 0 3 0;
#X connect 6 0 8 0;
#X connect 7 0 5 0;
#X connect 8 0 7 0;
#X restore 44 104 pd fps;
#X floatatom 44 127 5 0 0 1 fps - - 0;
#X obj 328 157 gemhead;
#X msg 484 360 program \$1;
#X msg 495 383 print_attributes;
#X obj 484 431 print vb;
#X obj 44 9 declare -lib Gem;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
#X msg 177 215 destroy;
#X obj 102 239 t a;
#X obj 318 54 inlet;
#X obj 318 255 gemwin;
#X obj 318 100 t a a;
#X obj 318 287 outlet;
#X obj 350 128 route create destroy;
#X obj 350 150 t b;
#X msg 350 172 1;
#X obj 390 150 t b;
#X msg 390 172 0;
#X obj 350 195 t f;
#X msg 350 219 set \$1;
#X text 118 122 rendering;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 9 0;
#X connect 8 0 7 0;
#X connect 8 1 10 0;
#X connect 10 0 11 0;
#X connect 10 1 13 0;
#X connect 11 0 12 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 42 51 pd gemwin;
#X obj 457 407 t a a;
#X obj 37 174 loadbang;
#X obj 457 301 f \$0;
#X obj 477 230 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000;
#X floatatom 457 255 5 0 0 0 - - - 0;
#X obj 457 278 t b f;
#X obj 340 184 bng 18 250 50 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000;
#X text 38 299 tables used by the vertex buffer;
#X obj 40 462 loadbang;
#X obj 60 510 textfile;
#X obj 60 565 textfile;
#X obj 60 615 textfile;
#X msg 119 511 print;
#X msg 122 566 print;
#X msg 123 614 print;
#N canvas 0 50 450 250 (subpatch) 0;
#X array \$0_positionY 10 float 3;
#A 0 -0.27142 0.557135 0.485707 -0.0857122 0.0571443 -0.371423 0.228574 0.442858 -0.471418 0.0571475;
#X coords 0 1 10 -1 200 140 1 0 0;
#X restore 881 424 graph;
#X obj 455 512 f \$0;
#X obj 455 465 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 37 218 s \$0_positionX;
#X msg 457 325 attribute positionX \$1_positionX \, attribute positionY \$1_positionY, f 67;
#X msg 455 536 attribute positionY \$1_positionY;
#X msg 37 196 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8;
#X obj 35 270 table \$0_positionX 10;
#X obj 328 569 gemvertexbuffer \; resize 10 \; draw linestripadj;
#X obj 455 488 metro 50;
#X text 480 465 <- switch on to update the position \, and play with the tab ->, f 64;
#X text 449 12 This example introduces adjacency;
#X text 323 32 This shader demonstrates cubic interpolation using adjacency information in a geometry shader. It takes a sequence of points and creates a smooth curved line passing through them \, using neighbouring points to calculate the curve's trajectory., f 94;
#X text 321 85 The vertex shader passes the input points to the geometry shader \, which uses the GL_LINES_ADJACENCY primitive type to access four consecutive vertices at once. For each set of four points \, it performs cubic interpolation to generate a smooth curve segment between the middle two points \, while using the outer points to influence the curvature., f 94;
#X obj 328 209 glsl shader/08.adjacency;
#X msg 60 486 read shader/08.adjacency.frag cr;
#X msg 60 542 read shader/08.adjacency.geom cr;
#X msg 60 592 read shader/08.adjacency.vert cr;
#X connect 0 0 1 0;
#X connect 2 0 37 0;
#X connect 3 0 8 0;
#X connect 4 0 8 0;
#X connect 8 0 31 0;
#X connect 8 1 5 0;
#X connect 9 0 29 0;
#X connect 10 0 27 0;
#X connect 11 0 12 0;
#X connect 12 0 13 0;
#X connect 13 0 10 0;
#X connect 13 1 3 0;
#X connect 14 0 37 0;
#X connect 16 0 39 0;
#X connect 16 0 40 0;
#X connect 16 0 38 0;
#X connect 20 0 17 0;
#X connect 21 0 18 0;
#X connect 22 0 19 0;
#X connect 24 0 28 0;
#X connect 25 0 32 0;
#X connect 27 0 8 0;
#X connect 28 0 31 0;
#X connect 29 0 26 0;
#X connect 32 0 24 0;
#X connect 37 0 31 0;
#X connect 37 1 12 0;
#X connect 38 0 17 0;
#X connect 39 0 18 0;
#X connect 40 0 19 0;
