-
Notifications
You must be signed in to change notification settings - Fork 2
/
of.fbo-help.pd
113 lines (113 loc) · 3.55 KB
/
of.fbo-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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#N canvas 452 49 636 749 12;
#X declare -lib ofelia;
#X obj 9 10 cnv 15 600 60 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 348 520 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 462 45 declare -lib ofelia;
#X msg 77 241 clear;
#X msg 242 380 get;
#X floatatom 379 508 5 0 0 0 - - -;
#X floatatom 411 488 5 0 0 0 - - -;
#X floatatom 443 468 5 0 0 0 - - -;
#X obj 348 445 unpack 0 0 0 0;
#X text 421 509 width;
#X text 451 489 height;
#X floatatom 87 618 5 0 0 0 - - -;
#X floatatom 151 503 5 0 0 0 - - -;
#X floatatom 101 573 5 0 0 0 - - -;
#X text 27 19 A Framebuffer object (texture container);
#X obj 29 595 of.rotate 0 45 0;
#X obj 208 90 of.draw 1;
#X text 346 535 1 = is allocated;
#X text 347 548 0 = is not allocated;
#X msg 136 379 autoclear \$1;
#X obj 136 359 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 491 469 Texture nb;
#X obj 83 476 of.color 255 255 255 100;
#X obj 83 529 of.sphere 50 10 line;
#X obj 29 653 of.box 200 200 200 5 5 5;
#X text 36 553 -> Where to draw the texture;
#X obj 29 88 of.draw 2;
#X obj 29 120 of.depth 1;
#X text 154 357 autoclear the buffer (default 1);
#X text 87 266 fill background (r g b a):;
#X obj 518 19 of.window 1;
#X obj 497 21 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X text 88 447 -> what to draw into the FBO;
#X obj 29 426 of.fbo 256 256 1;
#X msg 47 166 allocate 1024 1024 1;
#X msg 67 215 allocate 100 100 1;
#X msg 57 191 allocate 512 512 0;
#X text 275 380 get infos to right outlet;
#X text 158 424 -> width \, height \, type (1=RGBA);
#X text 458 442 -> get;
#X obj 21 695 cnv 15 600 20 empty empty empty 20 12 0 14 -260097 -66577
0;
#X text 26 38 Arguments(4): width \, height \, type \, autoclear-buffer
\; (default 100 \, 100 \, 0 \, 1);
#X text 46 148 allocate the pixel buffer (width \, height \, type)
;
#X msg 105 309 color 255 0 0 50;
#X msg 95 285 color 0 0 0 255;
#X msg 115 335 color 255 255 255 0;
#X text 200 168 colortype 1 = RGBA;
#X text 197 189 colortype 0 = RGB;
#X text 204 213 colortype 1 = RGBA;
#X text 230 309 fill color red (alpha 50 need colortype 1);
#X text 261 336 fill color white transparent (need colortype 1);
#X text 207 285 fill color black (no alpha);
#N canvas 647 101 448 219 draw_on_screen 0;
#X floatatom 20 29 5 0 0 0 - - -;
#X msg 56 140 anchorpoint \$1 \$1;
#X floatatom 56 112 5 0 0 0 - - -;
#X text 97 112 change anchor point;
#X text 128 83 Desactivate draw;
#X obj 20 179 outlet;
#X msg 38 83 draw 0 0;
#X text 180 53 activation \, X \, Y \, Z \, width \, height;
#X text 61 27 pos X;
#X text 16 4 draw image buffer on screen;
#X msg 20 54 draw 1 \$1 100 100 100;
#X connect 0 0 10 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 6 0 5 0;
#X connect 10 0 5 0;
#X restore 470 379 pd draw_on_screen;
#X text 124 241 clear the buffer (need re-allocate!);
#X text 137 694 might be unstable under MacOS after screen rebuild
while running, f 66;
#X obj 208 114 of.text inside\ box 20 center;
#X text 279 87 draw simple text "inside box";
#X connect 3 0 33 0;
#X connect 4 0 33 0;
#X connect 8 0 1 0;
#X connect 8 1 5 0;
#X connect 8 2 6 0;
#X connect 8 3 7 0;
#X connect 11 0 24 1;
#X connect 11 0 24 2;
#X connect 11 0 24 3;
#X connect 12 0 23 1;
#X connect 13 0 15 2;
#X connect 15 0 24 0;
#X connect 16 0 55 0;
#X connect 19 0 33 0;
#X connect 20 0 19 0;
#X connect 22 0 23 0;
#X connect 26 0 27 0;
#X connect 27 0 33 0;
#X connect 31 0 30 0;
#X connect 33 0 15 0;
#X connect 33 1 22 0;
#X connect 33 2 8 0;
#X connect 34 0 33 0;
#X connect 35 0 33 0;
#X connect 36 0 33 0;
#X connect 43 0 33 0;
#X connect 44 0 33 0;
#X connect 45 0 33 0;
#X connect 52 0 33 0;