gl to matrix troubles

Dec 10, 2006 at 3:02pm

gl to matrix troubles

hi,

i’m trying to get a patch of a friend of mine to render to matrix, but i only get a grayish image with the drawto command.
patch included, but it isn’t mine, so please contact me if you would like to use it or parts for something.
any solutions? this should work, it even says switching to software render.
thanks!
isjtar

#P user jit.pwindow 470 235 127 100 0 1 0 0 1 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 218 74 93 196617 drawto gltomatrix;
#P newex 471 180 180 196617 jit.matrix gltomatrix 4 char 800 600;
#P newex 430 469 99 196617 jit.gl.render sample;
#P comment 53 295 85 196617 —make z-depth;
#P number 121 114 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 200 329 108 196617 jit.op @op * @val 0.1;
#P newex 127 383 99 196617 prepend draw_mode;
#P newex 10 557 266 196617 jit.window sample @rect 420 360 1020 660 @floating 1;
#P number 141 291 35 9 4 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 141 309 56 196617 dim $1 $1;
#P user ubumenu 100 362 65 196617 0 1 1 0;
#X add points;
#X add lines;
#X add line_strip;
#X add line_loop;
#X add triangles;
#X add tri_strip;
#X add tri_fan;
#X add quads;
#X add quad_strip;
#X add polygon;
#X add tri_grid;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window linecount 3;
#P newex 51 413 305 196617 jit.gl.mesh sample @lighting_enable 0 @smooth_shading 1 @blend_enable 1 @fog 1 @blend_mode 3 1 @draw_mode line_loop @poly_mode 0 1 @rotatexyz 75.5 -25. 0. @texture tex;
#P newex 28 459 328 196617 jit.gl.mesh sample @lighting_enable 0 @smooth_shading 1 @blend_enable 1 @fog 1 @blend_mode 3 1 @draw_mode points @poly_mode 1 0 @point_size 3 @rotatexyz 75.5 -25. 0. @texture tex;
#P window linecount 1;
#P newex 200 309 172 196617 jit.slide @slide_up 5 @slide_down 5;
#P newex 28 266 27 196617 t b l;
#P newex 28 309 109 196617 jit.gencoord 3 float32;
#P newex 28 329 169 196617 jit.expr @expr “sin(in[0]*TWOPI)”;
#P newex 28 361 64 196617 jit.op @op +;
#N vpatcher 35 366 379 542;
#P window setfont “Sans Serif” 9.;
#P newex 21 39 48 196617 loadbang;
#P newex 21 117 121 196617 jit.gl.texture @name tex;
#P newex 21 95 273 196617 jit.rota @anchor_x 120 @anchor_y 120 @theta 1.570796;
#P newex 21 59 289 196617 jit.gradient 4 char 240 240 @start 0. 0.062745 0.188235 1. @end 0. 0.666667 1. 0.964706;
#P comment 73 40 131 196617 gradiation and texture stuff;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P pop;
#P newobj 299 506 95 196617 p gradient_texture;
#P newex 80 53 60 196617 loadmess 2;
#N vpreset 8;
#X append 1 2 16 175 223 flonum float 0.01 ; 19 158 76 number int 500 ; 20 175 265 ubumenu int 31 ; 22 175 166 number int 30 ; 34 362 100 ubumenu int 0 ; 36 291 141 number int;
#X append 1 2 90 ; 40 114 121 number int 5000 ;;
#X append 2 2 16 175 223 flonum float 7.75 ; 19 158 76 number int 1000 ; 20 175 265 ubumenu int 31 ; 22 175 166 number int 30 ; 34 362 100 ubumenu int 0 ; 36 291 141 number int;
#X append 2 2 90 ; 40 114 121 number int 5000 ;;
#X append 3 2 16 175 223 flonum float 4.7 ; 19 158 76 number int 729 ; 20 175 265 ubumenu int 31 ; 22 175 166 number int 95 ; 34 362 100 ubumenu int 2 ; 36 291 141 number int;
#X append 3 2 84 ; 40 114 121 number int 5000 ;;
#X append 4 2 16 175 223 flonum float 4.49 ; 19 158 76 number int 500 ; 20 175 265 ubumenu int 31 ; 22 175 166 number int 62 ; 34 362 100 ubumenu int 4 ; 36 291 141 number int;
#X append 4 2 34 ; 40 114 121 number int 5000 ;;
#X append 6 2 16 175 223 flonum float 7.75 ; 19 158 76 number int 500 ; 20 175 265 ubumenu int 28 ; 22 175 166 number int 68 ; 34 362 100 ubumenu int 0 ; 36 291 141 number int;
#X append 6 2 68 ; 40 114 121 number int 5000 ;;
#X append 7 2 16 175 223 flonum float 6. ; 19 158 76 number int 729 ; 20 175 265 ubumenu int 28 ; 22 175 166 number int 95 ; 34 362 100 ubumenu int 2 ; 36 291 141 number int;
#X append 7 2 84 ; 40 114 121 number int 2000 ;;
#X append 8 2 16 175 223 flonum float 6. ; 19 158 76 number int 500 ; 20 175 265 ubumenu int 28 ; 22 175 166 number int 62 ; 34 362 100 ubumenu int 4 ; 36 291 141 number int;
#X append 8 2 51 ; 40 114 121 number int 2000 ;;
#P preset 80 74 47 27;
#P newex 28 245 172 196617 jit.slide @slide_up 5 @slide_down 5;
#P number 166 175 35 9 4 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 166 197 55 196617 dim $1 $1;
#P user ubumenu 265 175 100 196617 0 1 1 0;
#X add distance.euclidean;
#X add distance.euclidean.squared;
#X add distance.manhattan;
#X add distance.manhattan.radial;
#X add distance.chebychev;
#X add distance.minkovsky;
#X add filter.bessel;
#X add filter.box;
#X add filter.catmullrom;
#X add filter.disk;
#X add filter.gaussian;
#X add filter.lanczossinc;
#X add filter.mitchell;
#X add filter.sinc;
#X add filter.triangle;
#X add transfer.step;
#X add transfer.smoothstep;
#X add transfer.bias;
#X add transfer.cubic;
#X add transfer.saw;
#X add transfer.quintic;
#X add transfer.gain;
#X add transfer.pulse;
#X add transfer.smoothpulse;
#X add transfer.sine;
#X add transfer.linear;
#X add transfer.solarize;
#X add noise.cell;
#X add noise.checker;
#X add noise.distorted;
#X add noise.gradient;
#X add noise.simplex;
#X add noise.voronoi;
#X add noise.value.cubicspline;
#X add noise.value.convolution;
#X add noise.sparse.convolution;
#X add fractal.mono;
#X add fractal.hetero;
#X add fractal.multi;
#X add fractal.multi.hybrid;
#X add fractal.multi.ridged;
#X add fractal.turbulence;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 76 158 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 46 177 40 196617 / 500.;
#N counter 2 3000 50000;
#X flags 0 0;
#P newobj 46 133 113 196617 counter 2 3000 50000;
#P flonum 223 175 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 223 197 84 196617 weight $1 $1 $1;
#P newex 310 197 70 196617 prepend basis;
#P newex 28 225 83 196617 jit.bfg 3 float32;
#B color 5;
#P message 46 197 118 196617 scale $1 $1 $1 , align $1;
#P newex 10 83 66 196617 t b b b erase;
#P user jit.fpsgui 10 527 60 196617 0;
#P toggle 10 26 35 0;
#P newex 10 64 57 196617 qmetro 20;
#P newex 10 506 24 196617 ww;
#P comment 232 247 140 196617 programed by masato tsutsui.;
#P hidden newex 345 69 105 196617 bgcolor 220 220 220;
#P comment 298 260 71 196617 http://adsr.jp;
#B color 12;
#P user ubutton 299 259 72 14 0 0;
#P window linecount 2;
#P hidden message 245 248 173 196617 ; max launch_browser http://adsr.jp;
#P newex 71 526 301 196617 jit.gl.gridshape sample @shape cube @scale 5 @color 0.1 0.1 0.1 @poly_mode 1 1 @line_width 1 @rotatexyz 75.5 -25. 0.;
#P window linecount 1;
#P comment 107 227 144 196617 —change points-lines solids ,;
#P connect 11 1 13 0;
#P connect 11 1 43 0;
#P connect 44 0 42 0;
#P connect 43 0 45 0;
#P connect 11 3 42 0;
#P connect 11 0 42 0;
#P connect 20 1 14 0;
#P hidden fasten 3 1 2 0 324 275 250 275;
#P connect 16 0 15 0;
#P connect 31 0 39 0;
#P fasten 30 1 31 0 50 286 205 286;
#P connect 22 0 21 0;
#P connect 36 0 35 0;
#P connect 34 1 38 0;
#P connect 40 0 17 3;
#P fasten 39 0 27 1 205 354 87 354;
#P connect 25 0 24 0;
#P connect 19 0 18 1;
#P connect 27 0 32 0;
#P fasten 27 0 33 0 33 406 56 406;
#P fasten 38 0 33 0 132 407 56 407;
#P connect 18 0 12 0;
#P connect 17 0 18 0;
#P connect 11 2 17 0;
#P connect 28 0 27 0;
#P connect 29 0 28 0;
#P connect 30 0 29 0;
#P hidden connect 35 0 29 0;
#P connect 23 0 30 0;
#P connect 13 0 23 0;
#P fasten 21 0 13 0 171 218 33 218;
#P fasten 12 0 13 0 51 218 33 218;
#P fasten 14 0 13 0 315 218 33 218;
#P fasten 15 0 13 0 228 218 33 218;
#P connect 8 0 11 0;
#P connect 9 0 8 0;
#P hidden connect 24 2 9 0;
#P window clipboard copycount 46;

#29139
Dec 10, 2006 at 7:29pm

There were 2 problems with your patch

1) You weren’t changeing the drawto attribute of the jit.gl.mesh objects and
2) Your order of banging for seeing the result in the jit.matrix was
wrong. You were looking at it right after the jit.gl.render erase
command is sent, which would make the matrix always grey.

#P button 48 104 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 615 430 199 196617 jit.gl.handle sample @inherit_transform 1;
#P newex 481 410 82 196617 t updateclients l;
#P user umenu 321 96 100 196647 1 64 112 1;
#X add gltomatrix;
#X add sample;
#P newex 323 127 80 196617 prepend drawto;
#P user jit.pwindow 531 230 127 100 0 1 0 0 1 0;
#P newex 531 176 180 196617 jit.matrix gltomatrix 4 char 800 600;
#P newex 490 465 99 196617 jit.gl.render sample;
#P comment 113 291 85 196617 —make z-depth;
#P number 181 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 260 325 108 196617 jit.op @op * @val 0.1;
#P newex 187 379 99 196617 prepend draw_mode;
#P newex 70 553 266 196617 jit.window sample @rect 420 360 1020 660 @floating 1;
#P number 201 287 35 9 4 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 201 305 56 196617 dim $1 $1;
#P user ubumenu 160 358 65 196617 0 1 1 0;
#X add points;
#X add lines;
#X add line_strip;
#X add line_loop;
#X add triangles;
#X add tri_strip;
#X add tri_fan;
#X add quads;
#X add quad_strip;
#X add polygon;
#X add tri_grid;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P window linecount 3;
#P newex 111 409 305 196617 jit.gl.mesh sample @lighting_enable 0
@smooth_shading 1 @blend_enable 1 @fog 1 @blend_mode 3 1 @draw_mode
line_loop @poly_mode 0 1 @rotatexyz 75.5 -25. 0. @texture tex;
#P newex 88 455 328 196617 jit.gl.mesh sample @lighting_enable 0
@smooth_shading 1 @blend_enable 1 @fog 1 @blend_mode 3 1 @draw_mode
points @poly_mode 1 0 @point_size 3 @rotatexyz 75.5 -25. 0. @texture
tex;
#P window linecount 1;
#P newex 260 305 172 196617 jit.slide @slide_up 5 @slide_down 5;
#P newex 88 262 27 196617 t b l;
#P newex 88 305 109 196617 jit.gencoord 3 float32;
#P newex 88 325 169 196617 jit.expr @expr “sin(in[0]*TWOPI)”;
#P newex 88 357 64 196617 jit.op @op +;
#N vpatcher 35 366 379 542;
#P window setfont “Sans Serif” 9.;
#P newex 21 39 48 196617 loadbang;
#P newex 21 117 121 196617 jit.gl.texture @name tex;
#P newex 21 95 273 196617 jit.rota @anchor_x 120 @anchor_y 120 @theta 1.570796;
#P newex 21 59 289 196617 jit.gradient 4 char 240 240 @start 0.
0.062745 0.188235 1. @end 0. 0.666667 1. 0.964706;
#P comment 73 40 131 196617 gradiation and texture stuff;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P pop;
#P newobj 359 502 95 196617 p gradient_texture;
#P newex 140 49 60 196617 loadmess 2;
#N vpreset 8;
#P preset 140 70 47 27;
#P newex 88 241 172 196617 jit.slide @slide_up 5 @slide_down 5;
#P number 226 171 35 9 4 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 226 193 55 196617 dim $1 $1;
#P user ubumenu 325 171 100 196617 0 1 1 0;
#X add distance.euclidean;
#X add distance.euclidean.squared;
#X add distance.manhattan;
#X add distance.manhattan.radial;
#X add distance.chebychev;
#X add distance.minkovsky;
#X add filter.bessel;
#X add filter.box;
#X add filter.catmullrom;
#X add filter.disk;
#X add filter.gaussian;
#X add filter.lanczossinc;
#X add filter.mitchell;
#X add filter.sinc;
#X add filter.triangle;
#X add transfer.step;
#X add transfer.smoothstep;
#X add transfer.bias;
#X add transfer.cubic;
#X add transfer.saw;
#X add transfer.quintic;
#X add transfer.gain;
#X add transfer.pulse;
#X add transfer.smoothpulse;
#X add transfer.sine;
#X add transfer.linear;
#X add transfer.solarize;
#X add noise.cell;
#X add noise.checker;
#X add noise.distorted;
#X add noise.gradient;
#X add noise.simplex;
#X add noise.voronoi;
#X add noise.value.cubicspline;
#X add noise.value.convolution;
#X add noise.sparse.convolution;
#X add fractal.mono;
#X add fractal.hetero;
#X add fractal.multi;
#X add fractal.multi.hybrid;
#X add fractal.multi.ridged;
#X add fractal.turbulence;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 136 154 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 106 173 40 196617 / 500.;
#N counter 2 3000 50000;
#X flags 0 0;
#P newobj 106 129 113 196617 counter 2 3000 50000;
#P flonum 283 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 283 193 84 196617 weight $1 $1 $1;
#P newex 370 193 70 196617 prepend basis;
#P newex 88 221 83 196617 jit.bfg 3 float32;
#B color 5;
#P message 106 193 118 196617 scale $1 $1 $1 , align $1;
#P newex 70 79 66 196617 t b b b erase;
#P user jit.fpsgui 70 523 60 196617 0;
#P toggle 70 22 35 0;
#P newex 70 60 57 196617 qmetro 20;
#P newex 70 502 24 196617 ww;
#P comment 292 243 140 196617 programed by masato tsutsui.;
#P hidden newex 405 65 105 196617 bgcolor 220 220 220;
#P comment 358 256 71 196617 http://adsr.jp;
#B color 12;
#P user ubutton 359 255 72 14 0 0;
#P window linecount 2;
#P hidden message 305 244 173 196617 ; max launch_browser http://adsr.jp;
#P newex 131 522 301 196617 jit.gl.gridshape sample @shape cube @scale
5 @color 0.1 0.1 0.1 @poly_mode 1 1 @line_width 1 @rotatexyz 75.5 -25.
0.;
#P window linecount 1;
#P comment 167 223 144 196617 —change points-lines solids ,;
#P connect 49 0 43 0;
#P connect 11 0 49 0;
#P connect 11 0 42 0;
#P connect 48 0 42 0;
#P connect 47 1 42 0;
#P connect 47 0 42 0;
#P connect 45 0 32 0;
#P connect 45 0 33 0;
#P connect 45 0 47 0;
#P connect 46 1 45 0;
#P hidden connect 24 2 9 0;
#P connect 9 0 8 0;
#P connect 8 0 11 0;
#P fasten 15 0 13 0 288 214 93 214;
#P fasten 14 0 13 0 375 214 93 214;
#P fasten 12 0 13 0 111 214 93 214;
#P fasten 21 0 13 0 231 214 93 214;
#P connect 13 0 23 0;
#P connect 23 0 30 0;
#P hidden connect 35 0 29 0;
#P connect 30 0 29 0;
#P connect 29 0 28 0;
#P connect 28 0 27 0;
#P connect 11 2 17 0;
#P connect 17 0 18 0;
#P connect 18 0 12 0;
#P fasten 38 0 33 0 192 403 116 403;
#P fasten 27 0 33 0 93 402 116 402;
#P connect 27 0 32 0;
#P connect 19 0 18 1;
#P connect 25 0 24 0;
#P fasten 39 0 27 1 265 350 147 350;
#P connect 40 0 17 3;
#P connect 34 1 38 0;
#P connect 36 0 35 0;
#P connect 22 0 21 0;
#P fasten 30 1 31 0 110 282 265 282;
#P connect 31 0 39 0;
#P connect 16 0 15 0;
#P hidden fasten 3 1 2 0 384 271 310 271;
#P connect 20 1 14 0;
#P connect 11 3 42 0;
#P connect 43 0 44 0;
#P connect 11 1 13 0;
#P window clipboard copycount 50;

#90285
Dec 10, 2006 at 8:11pm

thanks a lot, didn’t know you have to change all the destinations.
running back to msp now, gl scares me : )

#90286

You must be logged in to reply to this topic.