XML Feeds

.

[jitter] 2 render contexts, 1 window?

Zachary Seldess zseldess at hotmail.com
Sun Sep 16 17:48:20 MDT 2007


Here's a patch that shows a top and perspective view of a gridshape displayed in two separate jitter windows. You can click in the top view on the gridshape and move it around and it will correspondingly move in the perspective window. My question is: is there some way to display both render contexts in the same window, similar to Wes' patch in the thread below? 

http://www.cycling74.com/forums/index.php?t=msg&th=28208&start=0&rid=3109&S=948ebfab237b7d83a8d6db95b7a92d39

I've found a few posts regarding displaying one render context in two windows, but haven't found anything on the opposite. Any advice would be great. Thanks.

Here's the patch:


max v2;
#N vpatcher 16 381 774 755;
#P user ubutton 217 91 102 22 0 2;
#P window setfont Geneva 9.;
#P user ubumenu 223 93 90 196617 0 0 1 0;
#X setrgb 31 31 31 174 207 155 234 234 234 4 4 4 141 141 141 112 112 112;
#X add mouse control off;
#X add mouse control on;
#X prefix_set 0 0 <none> 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P hidden newex 223 68 72 131137545 r mouseControl;
#P window linecount 2;
#P newex 372 309 247 131137545 jit.gl.gridshape perspective @shape cube @scale 0.1 0.1 0.05 @lighting_enable 1 @color 0.1 0.1 0.3 1.;
#P window linecount 1;
#N vpatcher 764 213 1122 351;
#P toggle 58 31 15 0;
#P window setfont "Sans Serif" 9.;
#P message 58 52 55 131137545 floating \$1;
#P newex 9 79 312 131137545 jit.window perspective @rect 315 50 615 350 @depthbuffer 1 @floating 1;
#P fasten 1 0 0 0 63 74 14 74;
#P connect 2 0 1 0;
#P pop;
#P newobj 385 256 47 131137545 p window;
#B color 12;
#P newex 575 223 44 131137545 r toBall1;
#P flonum 579 196 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 543 196 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 507 196 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P newex 479 246 242 131137545 jit.gl.gridshape perspective @shape sphere @scale 0.15 0.15 0.15 @lighting_enable 1 @color 0.8 0.1 1. 1.;
#P window linecount 1;
#P newex 372 284 190 131137545 jit.gl.render perspective @camera 0. -3.5 2.;
#P newex 479 223 95 131137545 pak position 0. 0. 0.;
#P hidden newex 32 39 57 131137545 loadmess 1;
#P window linecount 2;
#P newex 32 309 217 131137545 jit.gl.gridshape top @shape cube @scale 0.1 0.1 0.05 @lighting_enable 1 @color 0.1 0.1 0.3 1.;
#P window linecount 1;
#N vpatcher 793 199 1133 588;
#P window setfont Geneva 9.;
#P window linecount 0;
#P newex 241 233 32 196617 print;
#P newex 125 163 48 196617 loadbang;
#P outlet 125 343 15 0;
#P toggle 125 259 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 16 261 44 131137545 r toBall1;
#P window setfont Geneva 9.;
#P newex 270 190 40 196617 change;
#P newex 228 190 40 196617 change;
#P window setfont "Sans Serif" 9.;
#P newex 16 75 44 131137545 qlim 500;
#P newex 16 53 48 131137545 r getRect;
#P newex 228 167 72 131137545 unpack 0 0 0 0;
#P newex 228 145 50 131137545 route rect;
#P window setfont Geneva 9.;
#P message 16 96 43 196617 getrect;
#P window setfont "Sans Serif" 9.;
#P newex 183 238 27 131137545 - 50;
#P newex 144 238 27 131137545 - 10;
#P message 159 186 34 131137545 nopoll;
#P newex 125 282 29 131137545 gate;
#P newex 144 259 88 131137545 pak 0. 0. 0.975976;
#P message 125 186 30 131137545 poll;
#P newex 125 207 88 131137545 mousestate;
#P message 125 306 106 131137545 screentoworld \$1 \$2 \$3;
#P newex 16 284 66 131137545 route position;
#P message 16 306 106 131137545 worldtoscreen \$1 \$2 \$3;
#P toggle 65 75 15 0;
#P message 65 96 55 131137545 floating \$1;
#P newex 16 123 272 131137545 jit.window top @rect 10 50 310 350 @depthbuffer 1 @floating 1;
#P connect 16 0 17 0;
#P connect 17 0 13 0;
#P connect 13 0 0 0;
#P fasten 1 0 0 0 70 118 21 118;
#P connect 20 0 4 0;
#P connect 4 0 3 0;
#P connect 2 0 1 0;
#P connect 23 0 7 0;
#P fasten 10 0 6 0 164 203 130 203;
#P connect 7 0 6 0;
#P connect 6 0 21 0;
#P connect 21 0 9 0;
#P connect 9 0 5 0;
#P connect 5 0 22 0;
#P fasten 3 0 22 0 21 331 130 331;
#P connect 6 1 11 0;
#P connect 11 0 8 0;
#P connect 8 0 9 1;
#P connect 18 0 11 1;
#P connect 6 2 12 0;
#P connect 12 0 8 1;
#P connect 19 0 12 1;
#P fasten 0 1 14 0 283 142 233 142;
#P connect 14 0 15 0;
#P connect 15 0 18 0;
#P connect 18 0 24 0;
#P fasten 15 1 19 0 253 186 275 186;
#P pop;
#P newobj 45 256 80 131137545 p window&mouse;
#B color 12;
#N vpatcher 514 384 881 647;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 195 92 74 131137545 s mouseControl;
#P window setfont Geneva 9.;
#N vpatcher 903 333 1306 737;
#P window setfont Geneva 9.;
#P window linecount 1;
#P newex 101 107 79 196617 r scaleDistance;
#P newex 82 130 29 196617 * 5.;
#P window linecount 0;
#P newex 12 53 89 196617 unpack 0. 0. 0.;
#P window linecount 1;
#P newex 171 359 22 196617 s x;
#P newex 82 198 21 196617 s z;
#P window linecount 0;
#P newex 12 102 49 196617 fswap 0.;
#P inlet 12 30 15 0;
#P newex 82 174 27 196617 t f f;
#P newex 255 314 34 196617 * -1.;
#P newex 255 288 119 196617 expr ($f1*0.83) + 2.16;
#P newex 171 336 116 196617 scale 0 360 10.5 -10.5;
#P flonum 171 314 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 171 290 34 196617 * -1.;
#P newex 12 263 130 196617 scale 135. 180 -360 -315;
#P newex 12 239 169 196617 if $f1 > 135 then $f1 else out2 $f1;
#P newex 171 263 39 196617 - 135.;
#P newex 12 196 41 196617 * 180.;
#P newex 12 174 64 196617 / 3.141593;
#P flonum 12 218 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 49 219 45 196617 degrees;
#P flonum 82 152 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 12 152 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 12 79 49 196617 cartopol;
#P connect 16 0 20 0;
#P connect 20 0 0 0;
#P connect 0 0 17 0;
#P connect 17 0 1 0;
#P connect 1 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 8 0;
#P connect 8 0 9 0;
#P connect 20 1 0 1;
#P connect 0 1 17 1;
#P fasten 17 1 21 0 56 124 87 124;
#P connect 21 0 2 0;
#P connect 2 0 15 0;
#P connect 15 0 18 0;
#P connect 22 0 21 1;
#P connect 8 1 7 0;
#P connect 7 0 10 0;
#P fasten 9 0 10 0 17 285 176 285;
#P connect 10 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 19 0;
#P fasten 13 0 12 3 260 309 239 309;
#P fasten 15 1 13 0 104 195 260 195;
#P connect 13 0 14 0;
#P connect 14 0 12 4;
#P pop;
#P newobj 102 149 46 196617 p rotate;
#B color 12;
#P inlet 17 27 15 0;
#P toggle 177 92 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 177 116 27 131137545 gate;
#P newex 177 50 40 131137545 key;
#P newex 177 70 35 131137545 sel 49;
#P newex 150 172 46 131137545 s toBall1;
#P newex 150 149 93 131137545 pak position 0. 0. 0.;
#P message 87 217 242 131137545 1.038296 -3.092796 -0.000002;
#P message 17 194 205 131137545 136. 192. 0.975976;
#P newex 87 172 59 131137545 prepend set;
#P newex 17 171 59 131137545 prepend set;
#P newex 17 50 151 131137545 route worldtoscreen screentoworld;
#P connect 11 0 0 0;
#P connect 0 0 1 0;
#P connect 1 0 3 0;
#P connect 0 1 2 0;
#P connect 2 0 4 0;
#P fasten 9 0 12 0 182 140 107 140;
#P connect 5 0 6 0;
#P connect 8 0 7 0;
#P connect 7 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 5 1;
#P fasten 0 1 9 1 92 111 199 111;
#P connect 10 0 13 0;
#P pop;
#P newobj 186 284 83 131137545 p mouseTranslate;
#B color 12;
#P newex 235 223 44 131137545 r toBall1;
#P newex 108 152 50 131137545 s getRect;
#P flonum 239 196 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 203 196 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 167 196 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 32 106 43 131137545 jit.qball;
#P number 77 62 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 32 62 15 0;
#P newex 32 83 55 131137545 metro 20;
#P newex 32 128 89 131137545 t b erase b erase b;
#P window linecount 2;
#P newex 139 246 216 131137545 jit.gl.gridshape top @shape sphere @scale 0.15 0.15 0.15 @lighting_enable 1 @color 0.8 0.1 1. 1.;
#P window linecount 1;
#P newex 32 284 147 131137545 jit.gl.render top @camera 0. 0. 4.;
#P newex 139 223 95 131137545 pak position 0. 0. 0.;
#P window setfont Geneva 9.;
#P window linecount 2;
#P comment 143 38 243 196617 Press '1' to toggle mouse control on \, then click and drag in the "top" window to move the ball around.;
#P hidden connect 17 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 8 0;
#P connect 8 0 4 0;
#P fasten 3 0 2 0 144 278 37 278;
#P fasten 15 0 2 0 50 278 37 278;
#P connect 4 0 2 0;
#P fasten 4 1 2 0 56 181 37 181;
#P connect 7 0 5 1;
#P connect 4 4 12 0;
#P connect 1 0 3 0;
#P fasten 13 0 3 0 240 242 144 242;
#P connect 9 0 1 1;
#P fasten 2 1 14 0 174 305 182 305 182 281 191 281;
#P fasten 10 0 1 2 208 214 200 214;
#P hidden connect 27 0 28 0;
#P fasten 11 0 1 3 244 214 228 214;
#P fasten 20 0 19 0 484 278 377 278;
#P fasten 4 3 19 0 94 181 377 181;
#P fasten 4 2 19 0 75 181 377 181;
#P fasten 24 0 20 0 580 242 484 242;
#P connect 18 0 20 0;
#P connect 21 0 18 1;
#P fasten 22 0 18 2 548 214 540 214;
#P fasten 23 0 18 3 584 214 568 214;
#P pop;

--
http://www.zacharyseldess.com



More information about the jitter mailing list