-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathGem-help.pd
59 lines (59 loc) · 3.45 KB
/
Gem-help.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#N canvas 85 65 578 389 12;
#X declare -lib Gem;
#X text 54 118 idiosyncrasies in Gem objects;
#X text 33 176 most (if not all) Gem objects share some common behaviour \, that you might want to be aware of \, in order to correctly and efficiently use them.;
#N canvas 251 126 624 486 init-messages 0;
#X obj 85 146 rectangle 4 3 \; draw line \; width 3;
#X text 53 53 Gem objects accept additional creation arguments \, that can be used to send initial messages to the object.;
#X obj 377 181 rectangle 4 3;
#X obj 377 129 loadbang;
#X msg 377 154 draw line \, width 3;
#X text 207 157 is really¹ the same as;
#X text 67 230 ¹ init-messages are sent right after the object is created and before it gets connected to other objects. therefore you can only use them to set the internal state of an object \, but not to send data to downstream objects.;
#X obj 141 388 print buffersize;
#X obj 141 348 pix_buffer \$0-buf 10 \; bang;
#X text 71 309 e.g. querying the size of a [pix_buffer] with the following does not work:;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 8 0 7 0;
#X restore 61 274 pd init-messages;
#N canvas 269 117 510 275 "gem_state" 0;
#X text 31 101 These messages can be created by [gemhead] and are then passed to downstream objects. You cannot (and should not attempt to) create such messages yourself.;
#X text 31 163 Typically these messages occur once per rendering tick (e.g. every 50ms) \, so it's easy to flood your Pd-console with printing them (or connecting the 1st outlet of a Gem object to an object that does not understand these messages), f 61;
#X text 31 25 Any Gem-object that can be used within a render-chain accepts a special Gem message with the selector "gem_state" on the 1st inlet \, and will also output such special Gem message on the 1st outlet.;
#X restore 61 241 pd "gem_state" messages;
#N canvas 375 374 585 541 debugging 0;
#X text 27 114 This indicates a bug \, either in a Gem object or your patch.;
#X text 74 80 GL[0x504]: stack underflow;
#X text 32 35 Every now and then you might see openGL error messages when rendering:;
#X text 23 161 The error is only emitted at the end of a render cycle (once all objects have been executed).;
#X text 26 198 If you want to track down the object that triggered the error \, you must enable the "debugGL" mode via the [Gem] object:;
#X obj 159 257 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X msg 159 282 debugGL \$1;
#X obj 159 307 Gem;
#X text 259 265 <- turn on/off per-object debugging;
#X text 257 307 <- turn it on/off for *all* Gem objects;
#X text 37 357 Tracking down openGL errors can be rather costly \, so it's not enabled by default.;
#X text 38 407 You can also turn debugging GL on/off for individual objects:;
#X obj 130 434 tgl 20 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X msg 130 459 debugGL \$1;
#X obj 130 484 cube;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X restore 61 311 pd debugging GL;
#X text 44 38 Gem - Graphics Environment for Multimedia;
#X text 44 48 =========================================;
#X text 54 133 -----------------------------;
#X obj 123 81 Gem;
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 20 85 INLET_0 gemlist draw;
#X text 20 125 OUTLET_0 gemlist;
#X text 10 145 AUTHOR IOhannes m zmölnig;
#X text 10 165 LICENSE GPL v2;
#X text 10 45 DESCRIPTION Gem meta object;
#X text 10 65 KEYWORDS Gem;
#X text 20 105 INLET_0 debugGL <float>;
#X restore 498 18 pd META;