rendering a shared context to a jit.matrix – only white!

Sep 22, 2006 at 6:04pm

rendering a shared context to a jit.matrix – only white!

I’m trying to render a shared context into a jit.matrix, and it doesn’t seem to work on my macmini 1.5 solo. It works fine to render the “preview” to a pwindow, but not a jit.matrix. Demonstration below. you’ll want to paste, then save, then re-open, as there are loadbangs.

can anyone else reproduce?
thanks,

PeterN

#P window setfont Geneva 9.;
#P window linecount 2;
#P comment 440 169 241 196617 tested on mac mini 1.5 solo , intle gma950 graphics chipset. Max 4.6.1 , Jitter 1.6.1;
#P user jit.fpsgui 91 174 60 196617 0;
#P window linecount 1;
#P message 615 444 33 196617 name;
#P window linecount 2;
#P comment 614 417 241 196617 once the matrix is named , I get all white , not the desired image.;
#P window linecount 1;
#P comment 479 425 122 196617 < - comes from "p bangs";
#P comment 617 383 241 196617 ?4? send bangs to the matrix;
#P comment 617 348 241 196617 ?3? name the matrix “preview”;
#P comment 618 278 241 196617 ?2? change name to something ther than “preview”;
#P window setfont “Sans Serif” 10.;
#P newex 36 36 63 131137546 loadmess 1;
#P window setfont Geneva 9.;
#P comment 618 232 210 196617 ?1? patch starts with this named “preview”;
#P message 617 246 73 196617 name preview;
#P toggle 614 399 15 0;
#P window setfont “Sans Serif” 10.;
#P newex 441 422 38 131137546 r drive;
#P newex 441 444 31 131137546 gate;
#P user jit.pwindow 467 565 82 62 0 1 0 0 1 0;
#P window setfont Geneva 9.;
#P message 616 364 73 196617 name preview;
#P message 617 292 33 196617 name;
#P window setfont “Sans Serif” 9.;
#P newex 468 532 110 131137545 jit.matrix 4 char 320 240;
#P window setfont Geneva 9.;
#P comment 439 153 163 196617 pnyboer-at-slambassador-dot-com;
#P comment 439 136 163 196617 patch by peter nyboer;
#P window linecount 2;
#P comment 439 101 176 196617 Rendering a shared context to a jit.matrix doesn’t seem to work!;
#P window linecount 1;
#P comment 41 541 241 196617 These goodies create the “Preview Window” above.;
#P window setfont “Sans Serif” 9.;
#P newex 127 97 65 131137545 loadmess 0.5;
#P window setfont Geneva 9.;
#P flonum 126 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 10 59 527 327;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 70 114 33 131137545 s last;
#P newex 312 79 34 131137545 s first;
#P newex 246 108 47 131137545 s 3plane;
#P newex 147 92 51 131137545 s 3dplane;
#P newex 206 84 45 131137545 s 2plane;
#P newex 174 114 45 131137545 s 1plane;
#P newex 270 80 40 131137545 s drive;
#P newex 108 113 45 131137545 s 0plane;
#P newex 76 50 288 131137545 t b b b b b b b b erase;
#P inlet 76 30 15 0;
#P outlet 76 71 15 0;
#P window setfont Geneva 9.;
#P window linecount 0;
#P comment 74 148 336 196617 automatic is off. order of layers in render is determined by these bangs;
#P connect 3 1 11 0;
#P connect 2 0 3 0;
#P connect 3 8 1 0;
#P connect 3 0 1 0;
#P connect 3 1 4 0;
#P connect 3 2 8 0;
#P connect 3 3 6 0;
#P connect 3 4 7 0;
#P connect 3 5 9 0;
#P connect 3 6 5 0;
#P connect 3 7 10 0;
#P pop;
#P newobj 41 229 43 196617 p bangs;
#P user jit.pwindow 441 278 162 122 0 1 0 0 1 0;
#X name preview;
#P window setfont “Sans Serif” 9.;
#N vpatcher 10 59 331 332;
#P window setfont “Sans Serif” 9.;
#P newex 76 42 57 131137545 loadmess 0;
#P flonum 221 139 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 217 162 37 131137545 rate $1;
#P message 185 163 27 131137545 stop;
#P message 146 162 32 131137545 start;
#P newex 58 109 41 131137545 r drive;
#P newex 62 157 65 131137545 prepend read;
#B color 5;
#P user umenu 54 69 100 131137575 1 64 83 1;
#X add :patches:media:dozer.mov;
#X add :patches:media:dishes.mov;
#X add :patches:media:blading.mov;
#X add :patches:media:bball.mov;
#X add :patches:media:countdown15.mov;
#X add :patches:media:rca.mov;
#X add :patches:media:ozone.mov;
#X add :patches:media:sunset.jpg;
#X add :patches:media:DSCF0367.JPG;
#X add :patches:media:DSCF0372.JPG;
#X add :patches:media:chilis.jpg;
#X add :patches:media:grid.gif;
#P inlet 53 45 15 0;
#P outlet 33 215 15 0;
#P newex 31 188 165 131137545 jit.qt.movie 320 240 @autostart 1;
#B color 5;
#P connect 7 0 0 0;
#P connect 6 0 0 0;
#P connect 4 0 0 0;
#P connect 8 0 0 0;
#P connect 5 0 0 0;
#P connect 0 0 1 0;
#P connect 10 0 3 0;
#P connect 2 0 3 0;
#P connect 3 1 4 0;
#P connect 9 0 8 0;
#P pop;
#P newobj 187 79 35 131137545 p mov;
#P window setfont Geneva 9.;
#P message 263 192 70 196617 size 320 240;
#P message 263 213 70 196617 size 640 480;
#P message 265 233 76 196617 size 1024 768;
#P window setfont “Sans Serif” 9.;
#N vpatcher 10 59 331 332;
#P window setfont “Sans Serif” 9.;
#P newex 76 42 57 131137545 loadmess 1;
#P flonum 221 139 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 217 162 37 131137545 rate $1;
#P message 185 163 27 131137545 stop;
#P message 146 162 32 131137545 start;
#P newex 58 109 41 131137545 r drive;
#P newex 62 157 65 131137545 prepend read;
#B color 5;
#P user umenu 54 69 100 131137575 1 64 83 1;
#X add :patches:media:dozer.mov;
#X add :patches:media:dishes.mov;
#X add :patches:media:blading.mov;
#X add :patches:media:bball.mov;
#X add :patches:media:countdown15.mov;
#X add :patches:media:rca.mov;
#X add :patches:media:ozone.mov;
#X add :patches:media:sunset.jpg;
#X add :patches:media:DSCF0367.JPG;
#X add :patches:media:DSCF0372.JPG;
#X add :patches:media:chilis.jpg;
#X add :patches:media:grid.gif;
#P inlet 53 45 15 0;
#P outlet 33 215 15 0;
#P newex 31 188 165 131137545 jit.qt.movie 320 240 @autostart 1;
#B color 5;
#P connect 5 0 0 0;
#P connect 8 0 0 0;
#P connect 4 0 0 0;
#P connect 6 0 0 0;
#P connect 7 0 0 0;
#P connect 0 0 1 0;
#P connect 10 0 3 0;
#P connect 2 0 3 0;
#P connect 3 1 4 0;
#P connect 9 0 8 0;
#P pop;
#P newobj 230 79 35 131137545 p mov;
#P window setfont “Sans Serif” 14.;
#N vpatcher 551 255 1108 654;
#P origin -31 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 318 183 76 131137545 size 1024 768;
#P window linecount 0;
#P newex 93 177 16 131137545 t l;
#N comlet to window;
#P inlet 309 96 15 0;
#P button 70 33 15 0;
#N vpatcher 157 436 642 652;
#P origin -30 9;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 509 124 64 131137545 s resetwin;
#P hidden newex 309 350 40 131137545 t 0 l 1;
#P window linecount 0;
#P hidden newex 119 424 75 131137545 prepend floating;
#P hidden newex 468 271 72 131137545 prepend coords;
#P hidden newex 472 236 81 131137545 v fullscreen_mon;
#P hidden newex 474 206 65 131137545 r fullscreenon;
#P hidden newex 538 50 68 131137545 r fullscreenoff;
#P hidden newex 124 391 60 131137545 prepend rect;
#P hidden newex 242 47 56 131137545 loadmess 1;
#P hidden newex 509 89 19 131137545 t b;
#P comment 152 113 124 131137545 no hardware acceleration;
#P hidden message 83 226 53 131137545 noaccel $1;
#P toggle 135 113 15 0;
#P comment 152 132 245 131137545 sync;
#P hidden message 196 235 45 131137545 sync $1;
#P toggle 135 132 15 0;
#P hidden message 139 231 40 131137545 fsaa $1;
#P comment 152 93 100 131137545 anti-aliased;
#P toggle 135 93 15 0;
#P hidden newex 205 416 20 131137545 t b;
#P hidden newex 205 395 69 131137545 r altwindowtest;
#P button 1 85 15 0;
#P comment 19 84 100 131137545 make 320;
#P hidden message 5 173 91 131137545 rect 10 100 330 340;
#P hidden message 83 299 101 131137545 rect 30 30 670 510;
#P hidden message 91 279 101 131137545 rect 30 30 830 630;
#P button 2 63 15 0;
#P comment 19 63 100 131137545 make 640;
#P hidden message 480 82 16 131137545 0;
#P hidden newex 462 52 38 131137545 sel 27;
#P hidden newex 462 29 40 131137545 key;
#P hidden message 225 417 55 131137545 xy 100 610;
#N thispatcher;
#Q window flags grow close zoom nofloat;
#Q window size 157 436 642 652;
#Q window title;
#Q window exec;
#Q savewindow 1;
#Q end;
#P hidden newobj 276 439 61 131137545 thispatcher;
#P hidden inlet 362 388 15 0;
#P toggle 135 25 15 0;
#P button 318 77 15 0;
#P comment 335 77 100 131137545 get monitor 2 coords;
#P button 318 58 15 0;
#P comment 337 58 100 131137545 get monitor 1 coords;
#P hidden newex 277 312 51 131137545 zl slice 1;
#P hidden newex 277 293 67 131137545 route coords;
#P hidden message 302 250 45 131137545 coords 1;
#P hidden message 283 223 45 131137545 coords 0;
#P hidden newex 277 272 61 131137545 jit.displays;
#P hidden newex 124 365 93 131137545 prepend fullscreen;
#P comment 152 70 100 131137545 fullscreen;
#P toggle 135 70 15 0;
#P hidden outlet 77 397 15 0;
#P comment 152 48 100 131137545 doublebuffer;
#P toggle 135 48 15 0;
#P hidden newex 104 334 104 131137545 prepend doublebuffer;
#P comment 152 27 150 131137545 float the window (esc unfloats);
#P button 2 43 15 0;
#P comment 19 43 100 131137545 make 800;
#P button 2 22 15 0;
#P hidden message 105 258 95 131137545 rect 0 0 1024 768;
#P comment 19 22 100 131137545 make 1024;
#P hidden newex 292 414 86 131137545 windsize 550 200 2;
#P hidden connect 36 0 34 0;
#P hidden connect 48 0 34 0;
#P hidden connect 50 0 10 0;
#P hidden connect 7 0 10 0;
#P hidden connect 13 0 10 0;
#P hidden connect 41 0 10 0;
#P hidden connect 43 0 10 0;
#P hidden connect 46 0 10 0;
#P hidden connect 34 0 10 0;
#P hidden connect 33 0 10 0;
#P hidden connect 32 0 10 0;
#P hidden connect 2 0 10 0;
#P hidden connect 55 0 10 0;
#P hidden connect 45 0 46 0;
#P hidden connect 31 0 33 0;
#P hidden connect 5 0 32 0;
#P hidden connect 8 0 7 0;
#P hidden connect 3 0 2 0;
#P connect 56 2 55 0;
#P hidden connect 29 0 55 0;
#P hidden connect 23 0 55 0;
#P hidden connect 11 0 13 0;
#P connect 56 1 50 0;
#P hidden connect 49 0 8 0;
#P hidden connect 39 0 41 0;
#P hidden connect 42 0 43 0;
#P hidden connect 37 0 38 0;
#P hidden connect 38 0 26 0;
#P hidden connect 0 0 25 0;
#P hidden connect 15 0 14 0;
#P hidden connect 16 0 14 0;
#P hidden connect 54 0 14 0;
#P hidden connect 14 0 17 0;
#P hidden connect 17 0 18 0;
#P hidden connect 20 0 15 0;
#P hidden connect 26 0 0 0;
#P hidden connect 22 0 16 0;
#P connect 18 1 56 0;
#P hidden connect 24 0 0 1;
#P hidden connect 27 0 28 0;
#P hidden connect 53 0 54 0;
#P hidden connect 52 0 53 0;
#P hidden connect 28 0 29 0;
#P hidden connect 51 0 29 0;
#P hidden connect 28 0 48 0;
#P hidden connect 51 0 48 0;
#P connect 28 0 57 0;
#P pop;
#P newobj 69 57 90 131137545 p WindowProperties;
#P message 223 119 62 131137545 name Output;
#P inlet 223 96 15 0;
#P newex 106 113 45 131137545 loadbang;
#P newex 108 212 219 131137545 jit.window livid @visible 1 @floating 0 @grow 0 @rect 10 100 330 340 @fsaa 1 @sync 0;
#P message 106 137 70 131137545 size 320 240;
#P connect 6 0 5 0;
#P connect 0 0 8 0;
#P connect 5 0 8 0;
#P connect 7 0 8 0;
#P connect 2 0 0 0;
#P connect 8 0 1 0;
#P connect 9 0 1 0;
#P connect 4 0 1 0;
#P connect 3 0 4 0;
#P pop;
#P newobj 193 255 115 131137550 p OutputWindow;
#P window setfont “Sans Serif” 9.;
#P newex 192 233 28 131137545 sel 1;
#P newex 68 285 35 131137545 r toGL;
#N vpatcher 351 197 943 626;
#P origin -220 -12;
#N comlet ch B;
#P inlet 75 74 15 0;
#P objectname chB[1];
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 374 254 47 131137545 enable 1;
#P flonum 72 52 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 39 96 80 131137545 scale 0. 1. 1. 0.;
#P newex 185 168 39 131137545 s 2pvu;
#P newex 227 168 39 131137545 s 1pvu;
#P newex 322 221 58 131137545 r 1metrics;
#P newex 15 245 45 131137545 r 2plane;
#P newex 23 123 45 131137545 gate 1 1;
#N comlet ch B;
#P inlet 188 98 15 0;
#P objectname chB;
#N comlet ch A;
#P inlet 230 98 15 0;
#P objectname chA;
#P newex 20 155 28 131137545 !- 1.;
#P message 14 212 82 131137545 color 1. 1. 1. $1;
#P newex 47 288 22 131137545 thr;
#P message 115 195 82 131137545 color 1. 1. 1. $1;
#P newex 280 258 45 131137545 r 1plane;
#P window linecount 2;
#P newex 258 283 260 131137545 jit.gl.videoplane Output @depth_enable 0 @blend_enable 1 @color 1. 1. 1. 1. @automatic 0 @blend_mode 6 1;
#P newex 41 318 260 131137545 jit.gl.videoplane Output @depth_enable 0 @blend_enable 1 @color 1. 1. 1. 0. @automatic 0 @blend_mode 6 1;
#P connect 6 0 5 0;
#P connect 9 0 6 0;
#P connect 17 0 14 0;
#P connect 15 0 14 0;
#P connect 4 0 0 0;
#P connect 8 0 4 0;
#P connect 10 0 4 0;
#P lcolor 8;
#P connect 5 0 4 0;
#P lcolor 8;
#P connect 14 0 9 1;
#P connect 9 0 3 0;
#P connect 8 0 13 0;
#P connect 7 0 12 0;
#P connect 7 0 1 0;
#P connect 16 0 1 0;
#P connect 3 0 1 0;
#P connect 11 0 1 0;
#P connect 2 0 1 0;
#P pop;
#P newobj 127 118 123 131137545 p planes;
#P newex 41 206 43 131137545 jit.qball;
#P toggle 35 74 15 0;
#P newex 41 181 45 131137545 metro 2;
#P window linecount 3;
#P newex 40 310 157 131137545 jit.gl.render Output @erase_color 0 0 0 1 @scale 1.33333 1. 1. @ortho 2 @camera 0 0 2;
#P window setfont Geneva 9.;
#P window linecount 1;
#P comment 441 267 163 196617 Preview Window (shared context);
#P window linecount 4;
#P comment 86 232 100 196617 automatic is off. order of layers in render is determined by these bangs;
#P window linecount 1;
#P comment 34 60 45 196617 ?on/off;
#P comment 126 65 35 196617 xfade;
#P window setfont “Sans Serif” 9.;
#P newex 154 478 18 131137545 t l;
#P newex 154 415 41 131137545 sel 1 0;
#P newex 41 521 310 131137545 jit.gl.videoplane preview @scale 1.333 1 @texture previewrender;
#P message 154 458 148 131137545 shared_context , copy_texture;
#P toggle 41 434 15 0;
#P newex 41 453 51 131137545 qmetro 33;
#P newex 41 474 50 131137545 t b erase;
#P newex 41 499 105 131137545 jit.gl.render preview;
#P message 154 439 258 131137545 shared_context preview , copy_texture previewrender;
#P window setfont “Sans Serif” 10.;
#P newex 42 390 63 131137546 loadmess 1;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P newex 40 559 216 131137545 jit.gl.texture preview @name previewrender @dim 160 120 @adapt 1 @colormode rgb @mode static;
#P connect 18 0 29 0;
#P connect 18 0 52 0;
#P connect 36 0 39 0;
#P connect 51 0 36 0;
#P connect 40 0 36 0;
#P connect 38 0 36 0;
#P connect 41 0 40 1;
#P connect 43 0 28 0;
#P connect 37 0 28 0;
#P connect 42 0 40 0;
#P connect 25 0 22 1;
#P connect 26 0 22 1;
#P connect 24 0 22 1;
#P connect 23 0 19 2;
#P connect 21 0 22 0;
#P connect 17 0 16 0;
#P connect 17 0 21 0;
#P connect 27 0 19 1;
#P connect 2 0 10 0;
#P connect 7 0 10 0;
#P connect 9 1 7 0;
#P connect 9 0 2 0;
#P connect 1 0 6 0;
#P connect 1 0 9 0;
#P connect 30 0 19 0;
#P connect 31 0 30 0;
#P fasten 4 1 3 0 86 495 46 495;
#P fasten 4 0 3 0 46 495 46 495;
#P connect 5 0 4 0;
#P connect 6 0 5 0;
#P connect 16 0 18 0;
#P connect 10 0 15 0;
#P connect 29 0 15 0;
#P connect 20 0 15 0;
#P connect 45 0 17 0;
#P window clipboard copycount 54;

#27742
Sep 22, 2006 at 6:44pm

Sorry but as of right now, shared contexts are only supported for
jit.window and jit.pwindow.

wes

#84282
Sep 22, 2006 at 6:47pm

On Sep 22, 2006, at 11:04 AM, pnyboer wrote:

>
> I’m trying to render a shared context into a jit.matrix, and it
> doesn’t seem to work on my macmini 1.5 solo. It works fine to
> render the “preview” to a pwindow, but not a jit.matrix.
> Demonstration below. you’ll want to paste, then save, then re-
> open, as there are loadbangs.

Sorry, but you can’t share resources between HW and Software
contexts. You’ll need to use one of the other means to copy from VRAM
back to a matrix.

-Joshua

#84283
Sep 22, 2006 at 11:53pm

ok, that would explain it!
thanks,

peter.

#84284

You must be logged in to reply to this topic.