From a9190f671ca05db756ce048b7900f1badcb74e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 23 Feb 2023 10:15:49 +0100 Subject: [PATCH] Update multicontext/texture example - fix typo in help-patch - pass "sharedcontext" message to [gemwin] - add some action to the squares --- .../14.multiple_windows/03.texture_sharing.pd | 85 +++++++++++++------ 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/examples/14.multiple_windows/03.texture_sharing.pd b/examples/14.multiple_windows/03.texture_sharing.pd index 62f80cd29..0a488c185 100644 --- a/examples/14.multiple_windows/03.texture_sharing.pd +++ b/examples/14.multiple_windows/03.texture_sharing.pd @@ -1,13 +1,10 @@ -#N canvas 224 736 1147 233 10; +#N canvas 983 248 1147 303 10; #X declare -lib Gem; #X obj 33 169 gemwin 20 a; -#X obj 396 181 square; -#X obj 141 26 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; +#X obj 141 26 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000; #X obj 396 37 gemhead a; #X text 158 24 1 create windows; #X obj 396 104 pix_texture; -#X obj 596 181 square; #X obj 596 155 pix_texture; #X obj 396 72 pix_image ../data/fractal.JPG; #X obj 596 59 translateXYZ 2 0 0; @@ -16,30 +13,62 @@ #X msg 596 4 context a; #X msg 669 4 context b; #X msg 80 118 destroy; -#X text 731 150 on Linux \, this is only supported by [gemglutwindow]. -; -#X text 730 98 support for texture sharing is limited by Operating -System \, ggraphics hardware \, openGL implementation and the windowing -backend.; -#X msg 33 87 title a \, create \, 1; -#X msg 168 117 title b \, create \, 1; +#X text 731 150 on Linux \, this is only supported by [gemglutwindow].; +#X text 730 98 support for texture sharing is limited by Operating System \, graphics hardware \, openGL implementation and the windowing backend.; #X obj 1030 16 declare -lib Gem; #X obj 141 46 t b b; #X obj 80 141 t a a; -#X connect 2 0 20 0; -#X connect 3 0 8 0; -#X connect 5 0 1 0; -#X connect 5 1 7 1; -#X connect 7 0 6 0; -#X connect 8 0 5 0; -#X connect 9 0 7 0; -#X connect 10 0 9 0; -#X connect 12 0 10 0; -#X connect 13 0 10 0; -#X connect 14 0 21 0; +#X msg 168 117 title b \, offset 512 0 \, create \, 1; +#X msg 33 87 title a \, offset 0 0 \, create \, 1; +#N canvas 735 418 450 300 rotating_square 0; +#X obj 204 202 square; +#X obj 204 118 t a b; +#X obj 204 181 rotateXYZ; +#X obj 277 123 i; +#X obj 277 146 + 1; +#X obj 277 169 % 360; +#X obj 277 192 t f f; +#X obj 88 53 inlet; +#X obj 88 76 t a a; +#X obj 204 97 separator; +#X obj 88 99 outlet; +#X obj 349 56 inlet; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 2 3; +#X connect 6 0 2 2; +#X connect 6 0 2 1; +#X connect 6 1 3 1; +#X connect 7 0 8 0; +#X connect 8 0 10 0; +#X connect 8 1 9 0; +#X connect 9 0 1 0; +#X connect 11 0 4 1; +#X restore 396 181 pd rotating_square; +#X obj 512 181 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1; +#X obj 215 199 loadbang; +#X msg 215 222 sharedcontext 1; +#X connect 1 0 16 0; +#X connect 2 0 6 0; +#X connect 4 0 20 0; +#X connect 4 1 5 1; +#X connect 5 0 20 0; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 7 0; +#X connect 10 0 8 0; +#X connect 11 0 8 0; +#X connect 12 0 17 0; +#X connect 16 0 19 0; +#X connect 16 1 18 0; #X connect 17 0 0 0; -#X connect 18 0 11 0; -#X connect 20 0 17 0; -#X connect 20 1 18 0; -#X connect 21 0 0 0; -#X connect 21 1 11 0; +#X connect 17 1 9 0; +#X connect 18 0 9 0; +#X connect 19 0 0 0; +#X connect 21 0 20 1; +#X connect 22 0 23 0; +#X connect 23 0 17 0;