Forums > Jitter

GL shared_context problem

June 9, 2007 | 3:21 am

Hi,

I followed Wes’ great GL preview window example from this thread:

http://www.cycling74.com/forums/index.php?t=msg&goto=77444

in a patch I’d built six months ago for a live performance. Worked like a charm. I haven’t changed anything in the patch, but I’ve since switched machines from a Powerbook G4 12" (Geforce FX5200Go) to a first-gen MacbookPro (Radeon x1600).

The problem is that the preview pwindow just shows white. I’m not getting any errors.

Wes’ example still works fine, but in comparing my performance patch to the example, I can’t seem to find what is going wrong on my patch, since I built it straight from the example. I’ve posted below a patch which just has the gl objects as they are (and named) in my performance patch, and substituted the source material with a dummy shape. The only thing to do is switch on the two checkboxes to render the main mix window and the "preview" pwindow.

Maybe I’m just blind and am missing something very obvious!

Thanks all,

-Tim

max v2;
#N vpatcher 140 365 1004 833;
#P origin 60 0;
#P window setfont "Sans Serif" 9.;
#P newex 507 161 48 196617 loadbang;
#P message 507 182 74 196617 name mixprev;
#P newex 254 99 185 196617 jit.gl.handle mix @inherit_transform 1;
#P number 243 54 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 198 71 55 196617 qmetro 33;
#P newex 198 89 50 196617 t b erase;
#P newex 198 122 370 196617 jit.gl.render mix @ortho 2 @shared_context mixprev @copy_texture mixwatch;
#P toggle 80 79 15 0;
#P message 80 97 45 196617 sync $1;
#P toggle 7 78 15 0;
#P newex 7 54 35 196617 sel 27;
#P message 7 96 68 196617 fullscreen $1;
#P newex 6 118 149 196617 jit.window mix @size 320 240;
#P newex 7 30 40 196617 key;
#P comment 220 35 77 196617 render main;
#P newex 196 238 106 196617 jit.gl.render mixprev;
#P newex 196 215 50 196617 t b erase;
#P newex 196 192 57 196617 qmetro 30;
#P newex 195 290 288 196617 jit.gl.videoplane mixprev @scale 1.333 1 @texture mixwatch;
#P newex 195 271 150 196617 jit.gl.texture @name mixwatch;
#P user jit.pwindow 506 201 322 242 0 0 0 0 1 0;
#X name mixprev;
#P toggle 196 163 20 0;
#P toggle 198 32 19 0;
#P window linecount 2;
#P newex 601 59 225 196617 jit.gl.gridshape mix @shape torus @color 0.8 0.1 0.1 0.8 @lighting_enable 1 @blend_enable 1;
#P window linecount 1;
#P comment 221 165 77 196617 render preview;
#P fasten 16 0 12 0 85 113 11 113;
#P fasten 13 0 12 0 12 113 11 113;
#P fasten 11 0 14 0 12 47 12 47;
#P fasten 14 0 15 0 12 68 12 68;
#P connect 15 0 13 0;
#P connect 17 0 16 0;
#P connect 3 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 9 0;
#P connect 8 1 9 0;
#P connect 2 0 20 0;
#P connect 20 0 19 0;
#P connect 22 0 18 0;
#P connect 19 0 18 0;
#P connect 19 1 18 0;
#P connect 21 0 20 1;
#P connect 24 0 23 0;
#P connect 23 0 4 0;
#P pop;


June 9, 2007 | 3:27 am

Hi Tim,
You didn’t provide a context name for your shared texture.

wes

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 514 168 48 196617 loadbang;
#P message 514 189 74 196617 name mixprev;
#P newex 261 106 185 196617 jit.gl.handle mix @inherit_transform 1;
#P number 250 61 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 205 78 55 196617 qmetro 33;
#P newex 205 96 50 196617 t b erase;
#P newex 205 129 370 196617 jit.gl.render mix @ortho 2 @shared_context
mixprev @copy_texture mixwatch;
#P toggle 87 86 15 0;
#P message 87 104 45 196617 sync $1;
#P toggle 14 85 15 0;
#P newex 14 61 35 196617 sel 27;
#P message 14 103 68 196617 fullscreen $1;
#P newex 13 125 149 196617 jit.window mix @size 320 240;
#P newex 14 37 40 196617 key;
#P comment 227 42 77 196617 render main;
#P newex 203 245 106 196617 jit.gl.render mixprev;
#P newex 203 222 50 196617 t b erase;
#P newex 203 199 57 196617 qmetro 30;
#P newex 202 297 288 196617 jit.gl.videoplane mixprev @scale 1.333 1
@texture mixwatch;
#P newex 202 278 191 196617 jit.gl.texture mixprev @name mixwatch;
#P user jit.pwindow 513 208 322 242 0 0 0 0 1 0;
#X name mixprev;
#P toggle 203 170 20 0;
#P toggle 205 39 19 0;
#P window linecount 2;
#P newex 608 66 225 196617 jit.gl.gridshape mix @shape torus @color
0.8 0.1 0.1 0.8 @lighting_enable 1 @blend_enable 1;
#P window linecount 1;
#P comment 228 172 77 196617 render preview;
#P connect 23 0 4 0;
#P connect 24 0 23 0;
#P connect 21 0 20 1;
#P connect 19 1 18 0;
#P connect 19 0 18 0;
#P connect 22 0 18 0;
#P connect 20 0 19 0;
#P connect 2 0 20 0;
#P connect 8 1 9 0;
#P connect 8 0 9 0;
#P connect 7 0 8 0;
#P connect 3 0 7 0;
#P connect 17 0 16 0;
#P connect 15 0 13 0;
#P fasten 14 0 15 0 19 75 19 75;
#P fasten 11 0 14 0 19 54 19 54;
#P fasten 13 0 12 0 19 120 18 120;
#P fasten 16 0 12 0 92 120 18 120;
#P window clipboard copycount 25;


June 9, 2007 | 6:39 pm

oops! Thanks a lot Wes!


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