Forums > Jitter

2 render contexts, 1 window?

September 16, 2007 | 11:48 pm

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 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;


September 17, 2007 | 1:07 am

Not two contexts, but two viewports in one window, yes. You can use
sketch and gluperspective, and glviewport to do this.

glmatrixmode projection, glloadidentity, gluperspective whatever
whatever., glviewport whatver whatever, then render your shiz.

etc etc.

search the list , I think I posted a patch with it working.


September 17, 2007 | 3:34 am

however opengl does allow two contexts to share one drawable(ie. window) so…

i would also like to know if this is possible with jitter.
i think probably not.
seems like the it’s setup to be 1 context per window.

maybe with the increasingly popular lua?


September 17, 2007 | 4:34 am

Just posted to the wrong thread by mistake – was at least able to erase the message below. Sorry. Here it is in the right place:

Ok, thanks Vade. I’m getting there with it. Sending the following to gl.sketch:

reset, glenable scissor_test, glmatrixmode modelview, glviewport 0 0 200 200, glscissor 0 0 200 200, glloadidentity, glscale 1. 0.5 1., glrotate 0. 0. 0. 0., moveto 0 0 -5, glclear GL_COLOR_BUFFER_BIT, drawobject object 0, glviewport 200 0 200 200, glscissor 200 0 200 200, glloadidentity, glscale 1. 0.5 1., moveto 0 0 -5, glrotate 0. 0. 0. 0., glclear GL_COLOR_BUFFER_BIT, drawobject object2 0, glflush

I still can’t figure out how to change my camera location so that each viewport is looking at the object from a different angle. Any suggestions?

Here’s the patch (modified from elsewhere):

max v2;
#N vpatcher 419 44 1118 665;
#P origin 0 -35;
#P window setfont Geneva 9.;
#P flonum 121 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 85 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 49 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 13 233 120 196617 pak position 0. 0. 0.;
#P window linecount 2;
#P message 144 430 75 196617 rotate 0. 0. 0. 0.;
#P window linecount 1;
#P newex 144 406 61 196617 prepend set;
#P number 198 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 133 294 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 68 320 141 196617 pak 0 0 0;
#P number 68 294 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 68 344 92 196617 prepend rotatexyz;
#P newex 68 367 92 196617 jit.gl.handle @fake;
#P newex 69 433 48 196617 r to_box;
#P window linecount 2;
#P newex 69 462 301 196617 jit.gl.gridshape fake @shape cube @color 1. 0. 0. 1. @automatic 0 @name object @lighting_enable 1 @position 0. 0. -2. @scale 1.;
#P window linecount 1;
#P message 350 133 55 196617 getcmdlist;
#P newex 68 566 292 196617 jit.window context @floating 1 @depthbuffer 1 @size 400 200;
#P newex 263 28 48 196617 loadbang;
#P newex 153 117 48 196617 s to_box;
#P newex 282 133 61 196617 r to_sketch;
#P newex 418 189 31 196617 print;
#P window linecount 5;
#P message 263 53 390 196617 reset , glenable scissor_test , glmatrixmode modelview , glviewport 0 0 200 200 , glscissor 0 0 200 200 , glloadidentity , glscale 1. 0.5 1. , glrotate 0. 0. 0. 0. , moveto 0 0 -5 , glclear GL_COLOR_BUFFER_BIT , drawobject object 0 , glviewport 200 0 200 200 , glscissor 200 0 200 200 , glloadidentity , glscale 1. 0.5 1. , moveto 0 0 -5 , glrotate 0. 0. 0. 0. , glclear GL_COLOR_BUFFER_BIT , drawobject object 0 , glflush;
#P window linecount 1;
#P newex 263 165 165 196617 jit.gl.sketch context @automatic 0;
#P newex 182 95 62 196617 s to_render;
#P newex 95 161 62 196617 s to_render;
#P newex 124 139 61 196617 s to_sketch;
#P number 82 30 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.fpsgui 37 150 46 196617 0;
#P newex 69 503 62 196617 r to_render;
#P newex 37 72 156 196617 t b b b b b erase;
#P toggle 37 29 15 0;
#P newex 37 49 55 196617 qmetro 50;
#P newex 69 534 212 196617 jit.gl.render context;
#P comment 68 265 100 196617 red box rotation;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 6 0;
#P connect 30 0 29 1;
#P connect 23 0 24 0;
#P connect 24 0 22 0;
#P connect 22 0 21 0;
#P fasten 21 0 19 0 73 399 130 399 130 454 74 454;
#P connect 20 0 19 0;
#P fasten 29 0 19 0 18 455 74 455;
#P fasten 5 0 1 0 74 525 74 525;
#P connect 7 0 2 1;
#P connect 31 0 29 2;
#P connect 4 2 9 0;
#P connect 32 0 29 3;
#P connect 4 3 8 0;
#P connect 25 0 24 1;
#P fasten 21 0 27 0 73 391 149 391;
#P connect 27 0 28 0;
#P connect 4 4 15 0;
#P connect 4 5 10 0;
#P connect 26 0 24 2;
#P connect 16 0 12 0;
#P fasten 18 0 11 0 355 159 268 159;
#P fasten 12 0 11 0 268 155 268 155;
#P fasten 14 0 11 0 287 154 268 154;
#P connect 11 1 13 0;
#P pop;


September 17, 2007 | 4:47 am

maybe this?

reset, glenable scissor_test, glmatrixmode modelview, glviewport 0 0 200 200, glscissor 0 0 200 200, glloadidentity, glscale 1. 0.5 1., glrotate 0. 0. 0. 0., moveto 0 0 -5, glclear GL_COLOR_BUFFER_BIT, drawobject object 0, glviewport 200 0 200 200, glscissor 200 0 200 200, glloadidentity, glscale 1. 0.5 1., moveto 3 0 -3, glrotate 45. 0. 1. 0., glclear GL_COLOR_BUFFER_BIT, drawobject object 0, glflush


September 18, 2007 | 2:55 am

Yeah, I ended up doing something similar to that. Here it is, although if you compare it with the first patch I posted, you’ll notice that the mouse control is not right yet. Haven’t had time to fool around with it.

max v2;
#N vpatcher 417 44 1121 647;
#P origin 0 -35;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 211 116 50 131137545 s getRect;
#P window setfont Geneva 9.;
#P newex 516 438 48 196617 r to_box;
#P window setfont "Sans Serif" 9.;
#N vpatcher 252 523 619 786;
#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 fasten 9 0 10 0 17 285 176 285;
#P connect 7 0 10 0;
#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 2.363332 0.887286 -0.001961;
#P message 17 194 205 131137545 104. -19. 0.951;
#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 161 557 83 131137545 p mouseTranslate;
#B color 12;
#N vpatcher 793 199 1133 588;
#P window setfont Geneva 9.;
#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.951;
#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 290 131137545 jit.window context @rect 10 50 410 250 @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 connect 7 0 6 0;
#P fasten 10 0 6 0 164 203 130 203;
#P connect 6 0 21 0;
#P connect 21 0 9 0;
#P connect 9 0 5 0;
#P fasten 3 0 22 0 21 331 130 331;
#P connect 5 0 22 0;
#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 301 142 233 142;
#P connect 14 0 15 0;
#P connect 15 0 18 0;
#P fasten 15 1 19 0 253 186 275 186;
#P pop;
#P newobj 133 503 80 131137545 p window&mouse;
#B color 12;
#P user ubutton 380 345 102 22 0 2;
#P window setfont Geneva 9.;
#P user ubumenu 386 347 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 0;
#P window setfont "Sans Serif" 9.;
#P hidden newex 386 322 72 131137545 r mouseControl;
#P newex 471 438 44 131137545 r toBall1;
#P flonum 475 411 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 439 411 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 403 411 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 2;
#P newex 375 461 282 131137545 jit.gl.gridshape context @shape sphere @name sphere @scale 0.5 0.5 0.5 @lighting_enable 1 @color 0.8 0.1 1. 1. @automatic 0;
#P window linecount 1;
#P newex 375 438 95 131137545 pak position 0. 0. 0.;
#P window setfont Geneva 9.;
#P window linecount 2;
#P comment 306 292 243 196617 Press ’1′ to toggle mouse control on , then click and drag in the "top" window to move the ball around.;
#P flonum 121 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 85 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 49 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 13 233 120 196617 pak position 0. 0. 0.;
#P window linecount 2;
#P message 144 430 79 196617 rotate 0. 0. 0. 0.;
#P window linecount 1;
#P newex 144 406 61 196617 prepend set;
#P number 198 293 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 133 294 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 68 320 141 196617 pak 0 0 0;
#P number 68 294 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 68 344 92 196617 prepend rotatexyz;
#P newex 68 367 92 196617 jit.gl.handle @fake;
#P newex 69 433 48 196617 r to_box;
#P window linecount 2;
#P newex 69 462 296 196617 jit.gl.gridshape fake @shape cube @color 1. 0. 0. 1. @automatic 0 @name object @lighting_enable 1 @position 0. 0. 0. @scale 1.;
#P window linecount 1;
#P message 350 146 55 196617 getcmdlist;
#P newex 263 28 48 196617 loadbang;
#P newex 153 117 48 196617 s to_box;
#P newex 282 146 61 196617 r to_sketch;
#P newex 418 202 31 196617 print;
#P window linecount 7;
#P message 263 53 370 196617 reset , glenable scissor_test , glmatrixmode modelview , glviewport 0 0 200 200 , glscissor 0 0 200 200 , glloadidentity , glscale 1. 0.5 1. , glrotate 0. 0. 0. 0. , moveto 0 0 0 , glulookat 0. 0. -10 0. 0. 0. 0. 1. 0. , glclear GL_COLOR_BUFFER_BIT , drawobject object 0 , drawobject sphere 0 , glviewport 200 0 200 200 , glscissor 200 0 200 200 , glloadidentity , glscale 1. 0.5 1. , moveto 0 0 0 , glrotate 0. 0. 0. 0. , glulookat 0. -8. -2. 0. 0. 0. 0. 1. 0. , glclear GL_COLOR_BUFFER_BIT , drawobject object 0 , drawobject sphere 0 , glflush;
#P window linecount 1;
#P newex 263 178 165 196617 jit.gl.sketch context @automatic 0;
#P newex 182 95 62 196617 s to_render;
#P newex 95 161 62 196617 s to_render;
#P newex 124 139 61 196617 s to_sketch;
#P number 82 30 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user jit.fpsgui 37 150 46 196617 0;
#P newex 69 503 62 196617 r to_render;
#P newex 37 72 185 196617 t b b b b b erase b;
#P toggle 37 29 15 0;
#P newex 37 49 55 196617 qmetro 50;
#P newex 69 534 102 196617 jit.gl.render context;
#P comment 68 265 100 196617 red box rotation;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 6 0;
#P connect 29 0 28 1;
#P connect 22 0 23 0;
#P connect 23 0 21 0;
#P connect 21 0 20 0;
#P fasten 20 0 18 0 73 399 130 399 130 454 74 454;
#P fasten 28 0 18 0 18 455 74 455;
#P connect 19 0 18 0;
#P fasten 42 0 1 0 138 526 74 526;
#P fasten 5 0 1 0 74 525 74 525;
#P connect 7 0 2 1;
#P connect 30 0 28 2;
#P connect 4 2 9 0;
#P connect 31 0 28 3;
#P connect 4 3 8 0;
#P connect 24 0 23 1;
#P fasten 20 0 26 0 73 391 149 391;
#P connect 26 0 27 0;
#P connect 4 4 15 0;
#P connect 1 1 43 0;
#P connect 4 5 10 0;
#P connect 25 0 23 2;
#P connect 4 6 45 0;
#P connect 16 0 12 0;
#P fasten 17 0 11 0 355 172 268 172;
#P fasten 12 0 11 0 268 155 268 155;
#P fasten 14 0 11 0 287 167 268 167;
#P fasten 44 0 34 0 521 457 380 457;
#P connect 33 0 34 0;
#P fasten 38 0 34 0 476 457 380 457;
#P hidden connect 39 0 40 0;
#P connect 35 0 33 1;
#P connect 11 1 13 0;
#P fasten 36 0 33 2 444 429 436 429;
#P fasten 37 0 33 3 480 429 464 429;
#P pop;


Viewing 6 posts - 1 through 6 (of 6 total)