Forums > Jitter

2 bugs in jit.gl.multiple

January 13, 2007 | 3:14 pm

1. Updating the first parameter of jit.gl.multiple causes attribute reset
and drawing.
2. Positioning differs with factor 50 from regular jit.gl objects

I can reproduce with jitter 1.6.3 b1 on OSX and 1.6.2 rc1 on XP.

cheers, -thijs

#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 622 475 100 9109513 need to divide coordinates by 50 to match
regular jit.gl. positioning;
#P window linecount 1;
#P newex 580 490 27 9109513 + 1;
#P toggle 580 472 15 0;
#P newex 580 514 42 9109513 gate 2 1;
#P newex 612 537 71 9109513 vexpr $f1 / 50.;
#P newex 580 568 76 9109513 prepend position;
#P flonum 668 385 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 631 385 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 591 385 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 668 354 133 9109513 jit.spill @plane 3 @listlength 1;
#P newex 631 331 133 9109513 jit.spill @plane 1 @listlength 1;
#P newex 612 420 61 9109513 pack 0. 0. 0.;
#P newex 591 310 133 9109513 jit.spill @plane 0 @listlength 1;
#P newex 580 592 149 9109513 jit.gl.gridshape foo @color 1 0 0 1;
#P window linecount 5;
#P comment 215 31 100 9109513 with automatic enabled you get double drawing.
once with correct attributes , once with reset;
#P window linecount 3;
#P comment 610 166 100 9109513 these don’t work when updating position on
every draw;
#P toggle 147 31 15 0;
#P window linecount 1;
#P newex 441 149 48 9109513 s multiple;
#P newex 147 91 48 9109513 s multiple;
#P message 147 67 62 9109513 automatic $1;
#P toggle 441 42 15 0;
#P newex 441 64 27 9109513 gate;
#P newex 458 42 41 9109513 r draw;
#P window linecount 2;
#P newex 441 112 227 9109513 jit.expr @expr "snorm[0]*2" "snorm[1]*2"
"cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)";
#P window linecount 1;
#P newex 441 88 130 9109513 jit.matrix 3 float32 15 15;
#P newex 348 113 41 9109513 r draw;
#P newex 78 188 41 9109513 s draw;
#P newex 246 136 56 9109513 r loadbang;
#P newex 159 386 56 9109513 s loadbang;
#N vpatcher 20 74 554 256;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 252 47 56 9109513 r loadbang;
#P button 252 68 15 0;
#P window linecount 1;
#P newex 50 87 77 9109513 jit.matrix rots;
#P newex 252 130 77 9109513 jit.matrix rots;
#P newex 252 108 256 9109513 jit.expr @expr "180*snorm[0]" "180*snorm[1]"
"0";
#P newex 252 87 130 9109513 jit.matrix 3 float32 15 15;
#P newex 142 87 34 9109513 / 50.;
#N counter 2 0 10000;
#X flags 0 0;
#P newobj 142 47 95 9109513 counter 2 0 10000;
#P newex 50 110 102 9109513 jit.op @op * @val 1.;
#P inlet 50 21 15 0;
#P inlet 166 67 15 0;
#P outlet 50 132 15 0;
#P connect 2 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 0 0;
#P fasten 2 0 4 0 55 43 147 43;
#P connect 4 0 5 0;
#P connect 5 0 3 1;
#P connect 1 0 5 1;
#P connect 11 0 10 0;
#P connect 10 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P pop;
#P newobj 348 177 37 9109513 p Spin;
#P newex 710 256 54 9109513 s multiple;
#P flonum 666 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 628 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 588 210 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 588 233 85 9109513 pak scale 1. 1. 1.;
#P flonum 788 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 750 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 710 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 710 233 95 9109513 pak position 0. 0. 0.;
#P newex 463 263 32 9109513 print;
#P newex 160 155 54 9109513 r multiple;
#N vpatcher 20 74 623 276;
#P window setfont "Sans Serif" 9.;
#P newex 286 72 130 9109513 jit.matrix 4 float32 50 50;
#P newex 286 115 117 9109513 jit.matrix 4 char 50 50;
#P newex 286 94 266 9109513 jit.expr @expr "0.5" "norm[0]" "norm[1]"
"1-norm[0]";
#P newex 286 136 233 9109513 jit.gl.texture foo @name t4 @texgen
environment;
#P button 50 50 15 0;
#P newex 50 72 109 9109513 jit.noise 4 char 50 50;
#P newex 50 94 233 9109513 jit.gl.texture foo @name t3 @texgen environment;
#P inlet 50 30 15 0;
#P connect 0 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 3 0 7 0 55 68 291 68;
#P connect 7 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P pop;
#P newobj 104 386 51 9109513 p TexGen;
#P flonum 375 157 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 375 354 1147 800;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 493 301 80 9109513 setall 0 1 , bang;
#P newex 493 324 117 9109513 jit.matrix 2 char 15 15;
#P newex 146 274 293 9109513 jit.expr @expr "0.5*norm[0]" "0.5*norm[1]" "
0.5*norm[0]";
#P newex 146 248 130 9109513 jit.matrix 3 float32 15 15;
#P newex 84 188 256 9109513 jit.expr @expr "180*snorm[0]" "180*snorm[1]"
"0";
#P newex 84 167 130 9109513 jit.matrix 3 float32 15 15;
#P window linecount 2;
#P newex 17 98 227 9109513 jit.expr @expr "snorm[0]*2" "snorm[1]*2"
"cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)";
#P window linecount 1;
#P newex 17 74 130 9109513 jit.matrix 3 float32 15 15;
#P inlet 91 36 15 0;
#P outlet 493 346 15 0;
#P outlet 146 296 15 0;
#P outlet 84 210 15 0;
#P outlet 17 132 15 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 0 0;
#P connect 4 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 1 0;
#P connect 4 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 2 0;
#P connect 4 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 3 0;
#P pop;
#P newobj 246 177 79 9109513 p GenGLParams;
#P newex 85 357 48 9109513 loadbang;
#P message 172 190 65 9109513 getglparams;
#P user jit.fpsgui 58 210 60 9109513 0;
#P message 52 506 34 9109513 reset;
#P newex 52 525 255 9109513 jit.gl.handle foo @inherit_transform 1
@auto_rotate 1;
#P toggle 476 525 15 0;
#P message 476 543 55 9109513 floating $1;
#P toggle 403 525 15 0;
#P newex 364 524 35 9109513 sel 27;
#P message 403 543 68 9109513 fullscreen $1;
#P newex 321 567 188 9109513 jit.window foo @depthbuffer 1 @sync 0;
#P newex 319 524 40 9109513 key;
#P number 75 106 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 34 106 15 0;
#P newex 34 128 50 9109513 qmetro 20;
#P newex 34 150 58 9109513 t b b erase;
#P newex 34 567 271 9109513 jit.gl.render foo @erase_color 1. 1. 1. 1.
@camera 0 0 -6;
#P button 85 385 15 0;
#P button 246 157 15 0;
#P window linecount 2;
#P newex 85 411 347 9109513 jit.gl.gridshape foo @shape torus
@lighting_enable 1 @blend_enable 1 @smooth_shading 1 @automatic 0
@depth_enable 1 @dim 10 10 @name me;
#P newex 246 225 227 9109513 jit.gl.multiple foo 4 @targetname me @glparams
position rotatexyz scale texture @texture t3 t4;
#B color 5;
#P window linecount 1;
#P comment 372 140 47 9109513 spin rate;
#P window linecount 5;
#P comment 516 20 100 9109513 when the first paramater is updated on every
draw , it triggers drawing and resets attributes;
#P connect 9 0 8 0;
#P connect 8 0 7 0;
#P fasten 18 0 6 0 57 554 39 554;
#P fasten 7 2 6 0 87 173 39 173;
#P connect 7 0 6 0;
#P connect 19 0 18 0;
#P connect 7 1 20 0;
#P connect 10 0 8 1;
#P fasten 7 1 40 0 63 182 83 182;
#P connect 22 0 5 0;
#P connect 5 0 3 0;
#P fasten 22 0 25 0 90 380 109 380;
#P connect 50 0 47 0;
#P connect 47 0 48 0;
#P fasten 22 0 38 0 90 380 164 380;
#P connect 39 0 4 0;
#P connect 4 0 23 0;
#P connect 23 0 2 0;
#P fasten 26 0 2 0 165 221 251 221;
#P fasten 21 0 2 0 177 221 251 221;
#P fasten 23 1 2 1 274 218 323 218;
#P fasten 37 0 2 1 353 218 323 218;
#P fasten 16 0 12 0 481 562 326 562;
#P fasten 13 0 12 0 408 562 326 562;
#P connect 41 0 37 0;
#P fasten 11 0 14 0 324 543 361 543 361 522 369 522;
#P connect 24 0 37 1;
#P fasten 23 2 2 2 297 212 395 212;
#P fasten 14 0 15 0 369 542 400 542 400 522 408 522;
#P connect 15 0 13 0;
#P connect 46 0 45 0;
#P connect 45 0 42 0;
#P connect 42 0 43 0;
#P connect 43 0 49 0;
#P connect 44 0 45 1;
#P fasten 23 3 2 3 320 206 467 206;
#P connect 2 1 27 0;
#P connect 17 0 16 0;
#P connect 64 0 65 0;
#P connect 65 0 63 0;
#P connect 63 0 61 0;
#P connect 62 0 61 0;
#P connect 61 0 53 0;
#P connect 43 0 54 0;
#P connect 54 0 58 0;
#P connect 58 0 55 0;
#P connect 55 0 63 1;
#P connect 63 1 62 0;
#P fasten 33 0 32 1 593 229 618 229;
#P connect 43 0 56 0;
#P connect 56 0 59 0;
#P connect 59 0 55 1;
#P fasten 34 0 32 2 633 229 643 229;
#P connect 60 0 55 2;
#P fasten 35 0 32 3 671 229 668 229;
#P connect 43 0 57 0;
#P connect 57 0 60 0;
#P connect 28 0 36 0;
#P fasten 32 0 36 0 593 253 715 253;
#P fasten 29 0 28 1 715 229 743 229;
#P fasten 30 0 28 2 755 229 771 229;
#P fasten 31 0 28 3 793 229 799 229;
#P window clipboard copycount 67;


January 13, 2007 | 7:26 pm

Hi Thijs,
I’m unable to reproduce but that doesn’t mean there aren’t bugs. Can
you post the steps needed to recreate the problems you’re
encountering?

thanks,
wes

On 1/13/07, Thijs Koerselman

wrote:
> 1. Updating the first parameter of jit.gl.multiple causes attribute reset
> and drawing.
> 2. Positioning differs with factor 50 from regular jit.gl objects
>
> I can reproduce with jitter 1.6.3 b1 on OSX and 1.6.2 rc1 on XP.
>
> cheers, -thijs
>
>
> #P window setfont "Sans Serif" 9.;
> #P window linecount 4;
> #P comment 622 475 100 9109513 need to divide coordinates by 50 to match
> regular jit.gl. positioning;
> #P window linecount 1;
> #P newex 580 490 27 9109513 + 1;
> #P toggle 580 472 15 0;
> #P newex 580 514 42 9109513 gate 2 1;
> #P newex 612 537 71 9109513 vexpr $f1 / 50.;
> #P newex 580 568 76 9109513 prepend position;
> #P flonum 668 385 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 631 385 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 591 385 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 668 354 133 9109513 jit.spill @plane 3 @listlength 1;
> #P newex 631 331 133 9109513 jit.spill @plane 1 @listlength 1;
> #P newex 612 420 61 9109513 pack 0. 0. 0.;
> #P newex 591 310 133 9109513 jit.spill @plane 0 @listlength 1;
> #P newex 580 592 149 9109513 jit.gl.gridshape foo @color 1 0 0 1;
> #P window linecount 5;
> #P comment 215 31 100 9109513 with automatic enabled you get double drawing.
> once with correct attributes , once with reset;
> #P window linecount 3;
> #P comment 610 166 100 9109513 these don’t work when updating position on
> every draw;
> #P toggle 147 31 15 0;
> #P window linecount 1;
> #P newex 441 149 48 9109513 s multiple;
> #P newex 147 91 48 9109513 s multiple;
> #P message 147 67 62 9109513 automatic $1;
> #P toggle 441 42 15 0;
> #P newex 441 64 27 9109513 gate;
> #P newex 458 42 41 9109513 r draw;
> #P window linecount 2;
> #P newex 441 112 227 9109513 jit.expr @expr "snorm[0]*2" "snorm[1]*2"
> "cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)";
> #P window linecount 1;
> #P newex 441 88 130 9109513 jit.matrix 3 float32 15 15;
> #P newex 348 113 41 9109513 r draw;
> #P newex 78 188 41 9109513 s draw;
> #P newex 246 136 56 9109513 r loadbang;
> #P newex 159 386 56 9109513 s loadbang;
> #N vpatcher 20 74 554 256;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 0;
> #P newex 252 47 56 9109513 r loadbang;
> #P button 252 68 15 0;
> #P window linecount 1;
> #P newex 50 87 77 9109513 jit.matrix rots;
> #P newex 252 130 77 9109513 jit.matrix rots;
> #P newex 252 108 256 9109513 jit.expr @expr "180*snorm[0]" "180*snorm[1]"
> "0";
> #P newex 252 87 130 9109513 jit.matrix 3 float32 15 15;
> #P newex 142 87 34 9109513 / 50.;
> #N counter 2 0 10000;
> #X flags 0 0;
> #P newobj 142 47 95 9109513 counter 2 0 10000;
> #P newex 50 110 102 9109513 jit.op @op * @val 1.;
> #P inlet 50 21 15 0;
> #P inlet 166 67 15 0;
> #P outlet 50 132 15 0;
> #P connect 2 0 9 0;
> #P connect 9 0 3 0;
> #P connect 3 0 0 0;
> #P fasten 2 0 4 0 55 43 147 43;
> #P connect 4 0 5 0;
> #P connect 5 0 3 1;
> #P connect 1 0 5 1;
> #P connect 11 0 10 0;
> #P connect 10 0 6 0;
> #P connect 6 0 7 0;
> #P connect 7 0 8 0;
> #P pop;
> #P newobj 348 177 37 9109513 p Spin;
> #P newex 710 256 54 9109513 s multiple;
> #P flonum 666 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 628 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 588 210 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 588 233 85 9109513 pak scale 1. 1. 1.;
> #P flonum 788 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 750 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P flonum 710 211 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 710 233 95 9109513 pak position 0. 0. 0.;
> #P newex 463 263 32 9109513 print;
> #P newex 160 155 54 9109513 r multiple;
> #N vpatcher 20 74 623 276;
> #P window setfont "Sans Serif" 9.;
> #P newex 286 72 130 9109513 jit.matrix 4 float32 50 50;
> #P newex 286 115 117 9109513 jit.matrix 4 char 50 50;
> #P newex 286 94 266 9109513 jit.expr @expr "0.5" "norm[0]" "norm[1]"
> "1-norm[0]";
> #P newex 286 136 233 9109513 jit.gl.texture foo @name t4 @texgen
> environment;
> #P button 50 50 15 0;
> #P newex 50 72 109 9109513 jit.noise 4 char 50 50;
> #P newex 50 94 233 9109513 jit.gl.texture foo @name t3 @texgen environment;
> #P inlet 50 30 15 0;
> #P connect 0 0 3 0;
> #P connect 3 0 2 0;
> #P connect 2 0 1 0;
> #P fasten 3 0 7 0 55 68 291 68;
> #P connect 7 0 5 0;
> #P connect 5 0 6 0;
> #P connect 6 0 4 0;
> #P pop;
> #P newobj 104 386 51 9109513 p TexGen;
> #P flonum 375 157 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #N vpatcher 375 354 1147 800;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 0;
> #P message 493 301 80 9109513 setall 0 1 , bang;
> #P newex 493 324 117 9109513 jit.matrix 2 char 15 15;
> #P newex 146 274 293 9109513 jit.expr @expr "0.5*norm[0]" "0.5*norm[1]"
> "0.5*norm[0]";
> #P newex 146 248 130 9109513 jit.matrix 3 float32 15 15;
> #P newex 84 188 256 9109513 jit.expr @expr "180*snorm[0]" "180*snorm[1]"
> "0";
> #P newex 84 167 130 9109513 jit.matrix 3 float32 15 15;
> #P window linecount 2;
> #P newex 17 98 227 9109513 jit.expr @expr "snorm[0]*2" "snorm[1]*2"
> "cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)";
> #P window linecount 1;
> #P newex 17 74 130 9109513 jit.matrix 3 float32 15 15;
> #P inlet 91 36 15 0;
> #P outlet 493 346 15 0;
> #P outlet 146 296 15 0;
> #P outlet 84 210 15 0;
> #P outlet 17 132 15 0;
> #P connect 4 0 5 0;
> #P connect 5 0 6 0;
> #P connect 6 0 0 0;
> #P connect 4 0 7 0;
> #P connect 7 0 8 0;
> #P connect 8 0 1 0;
> #P connect 4 0 9 0;
> #P connect 9 0 10 0;
> #P connect 10 0 2 0;
> #P connect 4 0 12 0;
> #P connect 12 0 11 0;
> #P connect 11 0 3 0;
> #P pop;
> #P newobj 246 177 79 9109513 p GenGLParams;
> #P newex 85 357 48 9109513 loadbang;
> #P message 172 190 65 9109513 getglparams;
> #P user jit.fpsgui 58 210 60 9109513 0;
> #P message 52 506 34 9109513 reset;
> #P newex 52 525 255 9109513 jit.gl.handle foo @inherit_transform 1
> @auto_rotate 1;
> #P toggle 476 525 15 0;
> #P message 476 543 55 9109513 floating $1;
> #P toggle 403 525 15 0;
> #P newex 364 524 35 9109513 sel 27;
> #P message 403 543 68 9109513 fullscreen $1;
> #P newex 321 567 188 9109513 jit.window foo @depthbuffer 1 @sync 0;
> #P newex 319 524 40 9109513 key;
> #P number 75 106 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
> #P toggle 34 106 15 0;
> #P newex 34 128 50 9109513 qmetro 20;
> #P newex 34 150 58 9109513 t b b erase;
> #P newex 34 567 271 9109513 jit.gl.render foo @erase_color 1. 1. 1. 1.
> @camera 0 0 -6;
> #P button 85 385 15 0;
> #P button 246 157 15 0;
> #P window linecount 2;
> #P newex 85 411 347 9109513 jit.gl.gridshape foo @shape torus
> @lighting_enable 1 @blend_enable 1 @smooth_shading 1 @automatic 0
> @depth_enable 1 @dim 10 10 @name me;
> #P newex 246 225 227 9109513 jit.gl.multiple foo 4 @targetname me @glparams
> position rotatexyz scale texture @texture t3 t4;
> #B color 5;
> #P window linecount 1;
> #P comment 372 140 47 9109513 spin rate;
> #P window linecount 5;
> #P comment 516 20 100 9109513 when the first paramater is updated on every
> draw , it triggers drawing and resets attributes;
> #P connect 9 0 8 0;
> #P connect 8 0 7 0;
> #P fasten 18 0 6 0 57 554 39 554;
> #P fasten 7 2 6 0 87 173 39 173;
> #P connect 7 0 6 0;
> #P connect 19 0 18 0;
> #P connect 7 1 20 0;
> #P connect 10 0 8 1;
> #P fasten 7 1 40 0 63 182 83 182;
> #P connect 22 0 5 0;
> #P connect 5 0 3 0;
> #P fasten 22 0 25 0 90 380 109 380;
> #P connect 50 0 47 0;
> #P connect 47 0 48 0;
> #P fasten 22 0 38 0 90 380 164 380;
> #P connect 39 0 4 0;
> #P connect 4 0 23 0;
> #P connect 23 0 2 0;
> #P fasten 26 0 2 0 165 221 251 221;
> #P fasten 21 0 2 0 177 221 251 221;
> #P fasten 23 1 2 1 274 218 323 218;
> #P fasten 37 0 2 1 353 218 323 218;
> #P fasten 16 0 12 0 481 562 326 562;
> #P fasten 13 0 12 0 408 562 326 562;
> #P connect 41 0 37 0;
> #P fasten 11 0 14 0 324 543 361 543 361 522 369 522;
> #P connect 24 0 37 1;
> #P fasten 23 2 2 2 297 212 395 212;
> #P fasten 14 0 15 0 369 542 400 542 400 522 408 522;
> #P connect 15 0 13 0;
> #P connect 46 0 45 0;
> #P connect 45 0 42 0;
> #P connect 42 0 43 0;
> #P connect 43 0 49 0;
> #P connect 44 0 45 1;
> #P fasten 23 3 2 3 320 206 467 206;
> #P connect 2 1 27 0;
> #P connect 17 0 16 0;
> #P connect 64 0 65 0;
> #P connect 65 0 63 0;
> #P connect 63 0 61 0;
> #P connect 62 0 61 0;
> #P connect 61 0 53 0;
> #P connect 43 0 54 0;
> #P connect 54 0 58 0;
> #P connect 58 0 55 0;
> #P connect 55 0 63 1;
> #P connect 63 1 62 0;
> #P fasten 33 0 32 1 593 229 618 229;
> #P connect 43 0 56 0;
> #P connect 56 0 59 0;
> #P connect 59 0 55 1;
> #P fasten 34 0 32 2 633 229 643 229;
> #P connect 60 0 55 2;
> #P fasten 35 0 32 3 671 229 668 229;
> #P connect 43 0 57 0;
> #P connect 57 0 60 0;
> #P connect 28 0 36 0;
> #P fasten 32 0 36 0 593 253 715 253;
> #P fasten 29 0 28 1 715 229 743 229;
> #P fasten 30 0 28 2 755 229 771 229;
> #P fasten 31 0 28 3 793 229 799 229;
> #P window clipboard copycount 67;
>
>
>
>
>


January 15, 2007 | 12:03 pm

On 1/13/07, Wesley Smith wrote:
>
> Hi Thijs,
> I’m unable to reproduce but that doesn’t mean there aren’t bugs. Can
> you post the steps needed to recreate the problems you’re
> encountering?
>
> Hi Wes,
I tried the updated version of gl.multiple, but it didn’t change anything. I
tried to make the patch a little more clear. Hope the one below makes more
sense.

1. If "position" is the first parameter/ inlet. to gl.multiple, updating its
values causes the instance to draw, and also to reset attributes like scale
and position for that draw. So if you set @automatic 1, you get 2 drawings,
one correct triggered by the automatic mechanism, and one with reset
attributes triggered by the matrix input on gl.multiple’s first inlet.

2. The position parameters for jit.gl.multiple seem to be x50 compared to
other gl.object. If I use the coordinates from the position matrix to draw
separate regular gl objects instead of using multiple for that, I have to
divide the position coordinates by 50 to get the same results.

best, -thijs

#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P comment 630 477 21 196620 5;
#B color 14;
#P window setfont "Sans Serif" 9.;
#P window linecount 5;
#P comment 834 241 119 196617 with automatic enabled , attributes only work
on the instance that is triggered internally by jit.gl.render;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P comment 811 245 21 196620 4;
#B color 14;
#P comment 325 315 21 196620 3;
#B color 14;
#P comment 682 165 21 196620 2;
#B color 14;
#P window setfont "Sans Serif" 9.;
#P newex 580 452 48 196617 loadbang;
#P newex 441 22 48 196617 loadbang;
#P window linecount 4;
#P comment 653 477 100 196617 need to divide coordinates by 50 to match
regular jit.gl. positioning (red ball);
#P window linecount 1;
#P newex 580 491 27 196617 + 1;
#P toggle 580 473 15 0;
#P newex 580 515 42 196617 gate 2 1;
#P newex 612 538 90 196617 vexpr $f1 / 50.;
#P newex 580 569 90 196617 prepend position;
#P flonum 668 386 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 631 386 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 591 386 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 668 355 152 196617 jit.spill @plane 3 @listlength 1;
#P newex 631 332 152 196617 jit.spill @plane 1 @listlength 1;
#P newex 612 421 61 196617 pack 0. 0. 0.;
#P newex 591 311 152 196617 jit.spill @plane 0 @listlength 1;
#P newex 580 593 173 196617 jit.gl.gridshape foo @color 1 0 0 1;
#P window linecount 5;
#P comment 389 318 114 196617 with automatic enabled you get double drawing.
once with correct attributes , once with reset;
#P window linecount 6;
#P comment 710 165 119 196617 these don’t work when updating gl.multiple’s
first parameter on every draw -> updating position matrix causes scale
attrib to reset.;
#P toggle 307 321 15 0;
#P window linecount 1;
#P newex 441 150 62 196617 s multiple;
#P newex 307 367 62 196617 s multiple;
#P message 307 343 76 196617 automatic $1;
#P toggle 441 43 15 0;
#P newex 441 65 27 196617 gate;
#P newex 458 43 41 196617 r draw;
#P window linecount 2;
#P newex 441 113 227 196617 jit.expr @expr "snorm[0]*2" "snorm[1]*2"
"cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)";
#P window linecount 1;
#P newex 441 89 130 196617 jit.matrix 3 float32 15 15;
#P newex 348 114 41 196617 r draw;
#P newex 78 189 41 196617 s draw;
#P newex 246 137 56 196617 r loadbang;
#P newex 159 387 56 196617 s loadbang;
#N vpatcher 20 74 554 256;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 252 47 56 196617 r loadbang;
#P button 252 68 15 0;
#P window linecount 1;
#P newex 50 87 77 196617 jit.matrix rots;
#P newex 252 130 77 196617 jit.matrix rots;
#P newex 252 108 256 196617 jit.expr @expr "180*snorm[0]" "180*snorm[1]"
"0";
#P newex 252 87 130 196617 jit.matrix 3 float32 15 15;
#P newex 142 87 34 196617 / 50.;
#N counter 2 0 10000;
#X flags 0 0;
#P newobj 142 47 95 196617 counter 2 0 10000;
#P newex 50 110 102 196617 jit.op @op * @val 1.;
#P inlet 50 21 15 0;
#P inlet 166 67 15 0;
#P outlet 50 132 15 0;
#P connect 2 0 9 0;
#P connect 9 0 3 0;
#P connect 3 0 0 0;
#P fasten 2 0 4 0 55 43 147 43;
#P connect 4 0 5 0;
#P connect 5 0 3 1;
#P connect 1 0 5 1;
#P connect 11 0 10 0;
#P connect 10 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 8 0;
#P pop;
#P newobj 348 178 37 196617 p Spin;
#P newex 681 285 54 196617 s multiple;
#P flonum 666 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 628 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 587 212 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 588 234 85 196617 pak scale 1. 1. 1.;
#P flonum 759 240 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 721 240 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 681 240 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 681 262 95 196617 pak position 0. 0. 0.;
#P newex 463 264 32 196617 print;
#P newex 160 156 54 196617 r multiple;
#N vpatcher 20 74 623 276;
#P window setfont "Sans Serif" 9.;
#P newex 286 72 130 196617 jit.matrix 4 float32 50 50;
#P newex 286 115 117 196617 jit.matrix 4 char 50 50;
#P newex 286 94 266 196617 jit.expr @expr "0.5" "norm[0]" "norm[1]"
"1-norm[0]";
#P newex 286 136 233 196617 jit.gl.texture foo @name t4 @texgen environment;
#P button 50 50 15 0;
#P newex 50 72 109 196617 jit.noise 4 char 50 50;
#P newex 50 94 233 196617 jit.gl.texture foo @name t3 @texgen environment;
#P inlet 50 30 15 0;
#P connect 0 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P fasten 3 0 7 0 55 68 291 68;
#P connect 7 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P pop;
#P newobj 104 387 51 196617 p TexGen;
#P flonum 375 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 375 354 1147 800;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 493 301 80 196617 setall 0 1 , bang;
#P newex 493 324 117 196617 jit.matrix 2 char 15 15;
#P newex 146 274 293 196617 jit.expr @expr "0.5*norm[0]" "0.5*norm[1]" "
0.5*norm[0]";
#P newex 146 248 130 196617 jit.matrix 3 float32 15 15;
#P newex 84 188 256 196617 jit.expr @expr "180*snorm[0]" "180*snorm[1]" "0";

#P newex 84 167 130 196617 jit.matrix 3 float32 15 15;
#P window linecount 2;
#P newex 17 98 227 196617 jit.expr @expr "snorm[0]*2" "snorm[1]*2"
"cos(snorm[0]*TWOPI)*sin(snorm[1]*TWOPI)";
#P window linecount 1;
#P newex 17 74 130 196617 jit.matrix 3 float32 15 15;
#P inlet 91 36 15 0;
#P outlet 493 346 15 0;
#P outlet 146 296 15 0;
#P outlet 84 210 15 0;
#P outlet 17 132 15 0;
#P connect 4 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 0 0;
#P connect 4 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 1 0;
#P connect 4 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 2 0;
#P connect 4 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 3 0;
#P pop;
#P newobj 246 178 79 196617 p GenGLParams;
#P newex 85 358 48 196617 loadbang;
#P message 172 191 65 196617 getglparams;
#P user jit.fpsgui 58 211 60 196617 0;
#P message 52 507 34 196617 reset;
#P newex 52 526 255 196617 jit.gl.handle foo @inherit_transform 1
@auto_rotate 1;
#P toggle 476 526 15 0;
#P message 476 544 55 196617 floating $1;
#P toggle 403 526 15 0;
#P newex 364 525 35 196617 sel 27;
#P message 403 544 68 196617 fullscreen $1;
#P newex 321 568 188 196617 jit.window foo @depthbuffer 1 @sync 0;
#P newex 319 525 40 196617 key;
#P number 75 107 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 34 107 15 0;
#P newex 34 129 64 196617 qmetro 20;
#P newex 34 151 58 196617 t b b erase;
#P newex 34 568 271 196617 jit.gl.render foo @erase_color 1. 1. 1. 1.
@camera 0 0 -6;
#P button 85 386 15 0;
#P button 246 158 15 0;
#P window linecount 2;
#P newex 85 412 347 196617 jit.gl.gridshape foo @shape torus
@lighting_enable 1 @blend_enable 1 @smooth_shading 1 @automatic 0
@depth_enable 1 @dim 10 10 @name me;
#P newex 246 226 265 196617 jit.gl.multiple foo 4 @targetname me @glparams
position rotatexyz scale texture @texture t3 t4 @automatic 0;
#B color 5;
#P window linecount 1;
#P comment 372 141 47 196617 spin rate;
#P window linecount 5;
#P comment 516 21 100 196617 when the first paramater is updated on every
draw , it triggers drawing and resets attributes;
#P window setfont "Sans Serif" 12.;
#P window linecount 1;
#P comment 35 83 21 196620 1;
#B color 14;
#P connect 10 0 9 0;
#P connect 9 0 8 0;
#P fasten 19 0 7 0 57 555 39 555;
#P fasten 8 2 7 0 87 174 39 174;
#P connect 8 0 7 0;
#P connect 20 0 19 0;
#P connect 8 1 21 0;
#P fasten 8 1 41 0 63 183 83 183;
#P connect 23 0 6 0;
#P connect 6 0 4 0;
#P connect 11 0 9 1;
#P fasten 23 0 26 0 90 381 109 381;
#P fasten 23 0 39 0 90 381 164 381;
#P connect 40 0 5 0;
#P connect 5 0 24 0;
#P fasten 22 0 3 0 177 222 251 222;
#P fasten 27 0 3 0 165 222 251 222;
#P connect 24 0 3 0;
#P fasten 17 0 13 0 481 563 326 563;
#P fasten 14 0 13 0 408 563 326 563;
#P fasten 38 0 3 1 353 219 336 219;
#P fasten 24 1 3 1 274 219 336 219;
#P connect 42 0 38 0;
#P fasten 12 0 15 0 324 544 361 544 361 523 369 523;
#P connect 25 0 38 1;
#P fasten 15 0 16 0 369 543 400 543 400 523 408 523;
#P connect 16 0 14 0;
#P fasten 24 2 3 2 297 213 421 213;
#P connect 68 0 47 0;
#P connect 47 0 46 0;
#P connect 46 0 43 0;
#P connect 43 0 44 0;
#P connect 44 0 50 0;
#P connect 45 0 46 1;
#P connect 3 1 28 0;
#P connect 18 0 17 0;
#P fasten 24 3 3 3 320 207 506 207;
#P connect 69 0 65 0;
#P connect 65 0 66 0;
#P connect 66 0 64 0;
#P connect 64 0 62 0;
#P connect 63 0 62 0;
#P connect 62 0 54 0;
#P connect 44 0 55 0;
#P connect 55 0 59 0;
#P connect 51 0 48 0;
#P connect 48 0 49 0;
#P connect 59 0 56 0;
#P connect 56 0 64 1;
#P connect 64 1 63 0;
#P fasten 34 0 33 1 592 230 618 230;
#P connect 44 0 57 0;
#P connect 57 0 60 0;
#P connect 60 0 56 1;
#P fasten 35 0 33 2 633 230 643 230;
#P connect 61 0 56 2;
#P fasten 36 0 33 3 671 230 668 230;
#P connect 44 0 58 0;
#P connect 58 0 61 0;
#P connect 29 0 37 0;
#P fasten 33 0 37 0 593 282 686 282;
#P fasten 30 0 29 1 686 258 714 258;
#P fasten 31 0 29 2 726 258 742 258;
#P fasten 32 0 29 3 764 258 770 258;
#P window clipboard copycount 75;- Hide quoted text -


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