Update of /cvsroot/pure-data/doc/tutorials/visual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4937
Modified Files: 05.lighting.pd Added Files: 02.gemwin_as_reference.pd TEMPLATE.pd gemwin_control-help.pd gemwin_control.pd Removed Files: 02.gemwin_as_reference copy.pd Log Message: messed with template, the first few patches will just use straight gemwin while later ones will use gemwin_contorl
--- NEW FILE: 02.gemwin_as_reference.pd --- #N canvas 548 149 480 369 10; #X obj 64 322 gemwin; #X obj 8 10 cnv 15 400 40 empty empty gemwin_as_pointer 20 12 0 24 -228992 -66577 0; #X msg 64 254 create; #X text 17 63 Gem is based on OpenGL , which uses the graphics card to do the processing. That means that instead of directly controlling the data like you do with Pd messages or audio , in Gem you are controlling a "pointer" to the data on the video card.; #X obj 302 323 gemwin; #X text 17 137 [gemwin] is a pointer to the output buffer of your video card. The screen you are looking at is that output buffer drawn to the screen.; #X msg 302 255 destroy; #X text 17 188 So even if there are multiple [gemwin] objects , there is only one screen. Each [gemwin] object is then a pointer to the same window.; #X connect 2 0 0 0; #X connect 6 0 4 0;
--- NEW FILE: TEMPLATE.pd --- #N canvas 15 58 628 448 10; #X obj 8 10 cnv 15 400 40 empty empty TEMPLATE 20 12 0 24 -228992 -66577 0; #X obj 465 16 gemwin_control; #X obj 466 60 import Gem;
--- 02.gemwin_as_reference copy.pd DELETED ---
--- NEW FILE: gemwin_control.pd --- #N canvas 224 95 713 582 10; #X obj 18 17 inlet; #X text 66 16 options pass-thru; #X obj 16 528 outlet; #X text 72 528 pass-thru; #X obj 17 503 gemwin $1; #X obj 386 467 send GLOBAL_GEMWIN_CONTROL; #X obj 101 103 cnv 15 128 22 empty GLOBAL_GEMWIN_CONTROL_CANVAS gemwin 3 5 0 14 -233017 -33289 0; #X obj 200 102 tgl 17 0 $0-render_toggle THIS_IS_TO_MAKE_THE_INLET_DISAPPEAR render -6 21 1 9 -233017 -33289 -33289 0 1; #X obj 159 102 tgl 17 0 $0-window_toggle THIS_IS_TO_MAKE_THE_INLET_DISAPPEAR window -6 21 1 9 -233017 -33289 -33289 0 1; #X obj 155 49 receive GLOBAL_GEMWIN_CONTROL; #N canvas 77 396 762 359 window 0; #X obj 56 126 select 0; #X obj 107 146 bang; #X msg 107 166 reset , create; #X msg 228 164 window set $1; #X obj 321 115 select 0 1; #X msg 354 136 76; #X msg 321 136 10; #X msg 331 163 window color $1 12 12; #X obj 93 235 outlet; #X obj 460 273 outlet; #X obj 58 6 inlet; #X text 106 7 window status; #X msg 527 164 render 0; #X obj 557 3 inlet; #X text 602 3 render status; #X obj 527 92 float; #X obj 58 47 trigger float bang; #X obj 58 28 route float; #X obj 527 143 select 1; #X text 488 66 turn off rendering , if on; #X msg 27 166 destroy; #X text 146 26 TODO: don't receive message if status is the same; #X obj 527 118 change; #X connect 0 0 20 0; #X connect 0 1 1 0; #X connect 1 0 2 0; #X connect 2 0 8 0; #X connect 3 0 9 0; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 7 0; #X connect 6 0 7 0; #X connect 7 0 9 0; #X connect 10 0 17 0; #X connect 12 0 9 0; #X connect 13 0 15 1; #X connect 15 0 22 0; #X connect 16 0 0 0; #X connect 16 0 4 0; #X connect 16 0 3 0; #X connect 16 1 15 0; #X connect 17 0 16 0; #X connect 18 0 12 0; #X connect 20 0 8 0; #X connect 22 0 18 0; #X restore 76 369 pd window logic; #X obj 41 153 receive $0-window_toggle; #N canvas 472 123 674 370 render 0; #X obj 253 118 select 0 1; #X msg 286 149 76; #X msg 253 149 10; #X msg 138 187 render set $1; #X msg 291 187 render color $1 12 12; #X obj 23 286 outlet; #X text 75 288 to gemwin; #X obj 377 280 outlet; #X obj 160 10 inlet; #X text 206 10 render status; #X text 545 8 window status; #X obj 498 8 inlet; #X msg 468 184 window 1; #X obj 469 101 float; #X text 430 75 create window , if not created; #X obj 469 152 select 0; #X obj 160 30 route float; #X obj 161 58 trigger float bang; #X msg 223 307 ; GLOBAL_GEMWIN_CONTROL_CANVAS color $1 12 12; #X obj 469 128 change; #X obj 381 128 iemabs/once; #X connect 0 0 2 0; #X connect 0 1 1 0; #X connect 1 0 4 0; #X connect 1 0 18 0; #X connect 2 0 4 0; #X connect 2 0 18 0; #X connect 3 0 7 0; #X connect 4 0 7 0; #X connect 8 0 16 0; #X connect 11 0 13 1; #X connect 12 0 7 0; #X connect 13 0 19 0; #X connect 15 0 12 0; #X connect 16 0 17 0; #X connect 17 0 3 0; #X connect 17 0 0 0; #X connect 17 0 5 0; #X connect 17 1 13 0; #X connect 17 1 20 0; #X connect 19 0 15 0; #X connect 20 0 12 0; #X restore 300 369 pd render logic; #X obj 313 153 receive $0-render_toggle; #X obj 155 72 route window render status; #X obj 301 230 float; #X obj 76 233 float; #X obj 263 153 bang; #X msg 529 250 status; #X obj 414 203 loadbang; #X obj 300 296 spigot 0; #X obj 77 296 spigot 0; #X obj 414 224 trigger bang bang; #X msg 414 250 1; #X text 354 187 first get status from existing objects; #X obj 76 255 change; #X obj 301 251 change; #X connect 0 0 4 0; #X connect 4 0 2 0; #X connect 9 0 14 0; #X connect 10 0 4 0; #X connect 10 1 5 0; #X connect 11 0 16 0; #X connect 12 0 4 0; #X connect 12 1 5 0; #X connect 13 0 15 0; #X connect 14 0 8 0; #X connect 14 1 7 0; #X connect 14 2 17 0; #X connect 15 0 26 0; #X connect 16 0 25 0; #X connect 17 0 15 0; #X connect 17 0 16 0; #X connect 18 0 5 0; #X connect 19 0 22 0; #X connect 20 0 12 0; #X connect 20 0 10 1; #X connect 21 0 10 0; #X connect 21 0 12 1; #X connect 22 0 23 0; #X connect 22 1 18 0; #X connect 23 0 20 1; #X connect 23 0 21 1; #X connect 25 0 21 0; #X connect 26 0 20 0; #X coords 0 -1 1 1 130 28 1 100 100;
--- NEW FILE: gemwin_control-help.pd --- #N canvas 584 136 494 414 10; #X text 55 51 control the gemwin and rendering , and see status; #X obj 67 130 gemwin_control; #X obj 241 129 gemwin_control;
Index: 05.lighting.pd =================================================================== RCS file: /cvsroot/pure-data/doc/tutorials/visual/05.lighting.pd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05.lighting.pd 7 Apr 2006 05:22:42 -0000 1.1 --- 05.lighting.pd 7 Apr 2006 06:01:54 -0000 1.2 *************** *** 1,8 **** ! #N canvas 548 149 492 381 10; ! #X obj 11 9 cnv 15 400 40 empty empty lighting 20 12 0 24 -228992 -66577 0; ! #X obj 29 120 gemwin; ! #X msg 28 63 create , 1; ! #X msg 42 90 destroy; ! #X connect 2 0 1 0; ! #X connect 3 0 1 0; --- 1,18 ---- ! #N canvas 362 246 632 452 10; ! #X obj 8 10 cnv 15 400 40 empty empty lighting 20 12 0 24 -228992 -66577 0; ! #X obj 465 16 gemwin_control; ! #X obj 466 60 import Gem; ! #X obj 29 150 gemwin; ! #X msg 29 119 lighting $1; ! #X obj 29 101 tgl 15 1 empty empty empty 0 -6 0 8 -24198 -1 -1 0 1 ! ; ! #X obj 72 294 world_light; ! #X obj 72 256 gemhead; ! #X obj 295 253 gemhead; ! #X obj 295 274 sphere 1 35; ! #X text 255 228 draw a sphere; ! #X connect 4 0 3 0; ! #X connect 5 0 4 0; ! #X connect 7 0 6 0; ! #X connect 8 0 9 0;