Forums > Jitter

readback from texture problem on laptop (works on desk)

May 16, 2006 | 4:36 pm


May 17, 2006 | 7:36 am

Hmm, that isn’t working for me either.
I had a similar problem when I was fooling with Jit.atari2600 and trying to output to a matrix.
ATI mobility Radeon 9700 in a Dell
Modify this code to fit your naming and resolution specs:
Qmetro in the top, matrix out the bottom.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 838 544 103 9109513 jit.dimmap @invert 0 1;
#B color 5;
#P hidden newex 838 465 27 9109513 t b b;
#P hidden message 889 429 130 9109513 reset , glreadpixels OutbackIn;
#P hidden newex 889 484 160 9109513 jit.gl.sketch KFOutput @automatic 0;
#P hidden newex 838 515 155 9109513 jit.matrix OutbackIn 4 char 320 240;
#P hidden newex 838 430 38 9109513 qlim 50;
#P hidden connect 3 0 2 0;
#P hidden connect 4 1 2 0;
#P connect 1 0 5 0;
#P hidden connect 4 0 1 0;
#P connect 0 0 4 0;
#P window clipboard copycount 6;

Here’s my method of reading back GL info.
I like the fact that I can limit the rate to my preview window by this method. But I’m just getting my feet wet in GL, so I’m sure there are better ways.

I’d be curious what sort of framerate you get on your example patch, since I may have to upgrade my laptop soon and was curious how the Dualcore’s compare to my 3.2GHz pentium IV.


May 17, 2006 | 2:19 pm

thanks for a confirmation…Does the mo-9700 share memory w/ the cpu or is all memory resident on the graphics card? I couldn’t find any specs about that. The x1300 definitely does, which could be part of my problem (esp. since the host only has 512MB…which will change in a day or so!).

I wasn’t quite sure how you are using that patch in the context of readback… is it that you are doing all your drawing in sketch and then read the pixels, or is there some trick that my tiny brain isn’t seeing here? :) I haven’t really explored glsketch a whole lot…

P


May 19, 2006 | 4:02 pm

well, the glsketch method doesn’t seem to work either.
the computer now has 1.5MB of ram, but that didn’t change anything.
the below patch just doesn’t provide the desired results…Help!

#P user jit.pwindow 593 241 74 56 0 1 0 0 1 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 594 132 27 9109513 t b b;
#P message 645 96 182 9109513 reset , glreadpixels OutbackIn 0 0 720 540;
#P newex 645 151 131 9109513 jit.gl.sketch v1 @automatic 0;
#P newex 594 182 155 9109513 jit.matrix OutbackIn 4 char 720 540;
#P newex 594 97 38 9109513 qlim 50;
#P message 219 413 73 9109513 read dozer.mov;
#P button 198 134 15 0;
#P newex 173 467 71 9109513 jit.gl.texture v1;
#P number 388 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 344 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 307 173 91 9109513 pack dim 720 540;
#P number 285 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 241 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 104 21 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 317 570 71 9109513 prepend color;
#P newex 317 546 52 9109513 append 1.;
#P toggle 317 500 15 0;
#N vpatcher 40 55 440 355;
#P window setfont "Sans Serif" 9.;
#P number 194 190 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 245 194 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 335 120 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 127 172 83 9109513 vexpr $f1/205.;
#P inlet 75 73 15 0;
#P outlet 155 202 15 0;
#P window linecount 0;
#P newex 126 150 139 9109513 pack i i i;
#P newex 254 76 62 9109513 metro 1300;
#P message 254 114 45 9109513 $1 1300;
#P newex 254 95 62 9109513 random 256;
#P newex 254 131 45 9109513 line 100;
#P newex 190 131 45 9109513 line 100;
#P newex 190 95 62 9109513 random 256;
#P message 190 114 41 9109513 $1 900;
#P newex 190 76 55 9109513 metro 900;
#P toggle 126 40 24 0;
#P newex 126 76 62 9109513 metro 1000;
#P message 126 114 45 9109513 $1 1000;
#P newex 126 95 62 9109513 random 256;
#P newex 126 131 45 9109513 line 100;
#P comment 154 44 185 9109513 < - turn on mood machine;
#P connect 16 0 5 0;
#P connect 5 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 1 0;
#P connect 1 0 14 0;
#P connect 14 0 17 0;
#P connect 17 0 15 0;
#P connect 20 0 4 1;
#P connect 5 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 7 0;
#P connect 7 0 9 0;
#P connect 9 0 14 1;
#P connect 19 0 6 1;
#P connect 5 0 13 0;
#P connect 13 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 10 0;
#P connect 10 0 14 2;
#P connect 18 0 13 1;
#P pop;
#P newobj 317 521 81 9109513 p mood_machine;
#P comment 339 503 185 9109513 < - turn on mood machine;
#P newex 173 439 55 9109513 jit.qt.movie;
#P newex 198 173 91 9109513 pack dim 720 540;
#P message 126 391 90 9109513 smooth_shading 1;
#P user jit.fpsgui 44 420 60 9109513 0;
#P user jit.pwindow 229 280 74 56 0 1 0 0 1 0;
#P newex 139 295 75 9109513 loadmess 0.01;
#P newex 114 166 29 9109513 t b b;
#P newex 114 248 151 9109513 jit.matrix dvm 4 char 720 540;
#P message 159 201 73 9109513 tomatrix dvm;
#P flonum 137 317 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 99 342 130 9109513 pak erase_color 0. 0. 0. 1.;
#P message 155 535 73 9109513 reset;
#P newex 20 555 71 9109513 prepend shape;
#P user ubumenu 20 529 72 9109513 0 1 1 0;
#X add sphere;
#X add torus;
#X add cylinder;
#X add opencylinder;
#X add cube;
#X add opencube;
#X add plane;
#X add circle;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P newex 155 563 151 9109513 jit.gl.handle v1 @auto_rotate 1;
#P newex 42 314 50 9109513 t b erase;
#P window linecount 2;
#P newex 20 595 257 9109513 jit.gl.gridshape v1 @shape cube @blend_enable 1 @texture dv @blend_mode 6 1 @scale 0.6 @color 1. 0.7 0.4 1.;
#P toggle 42 25 15 0;
#P window linecount 1;
#P newex 42 55 57 9109513 qmetro 16;
#P message 435 311 114 9109513 usetexture dv , to_texture;
#P newex 42 85 367 9109513 t b b b;
#P newex 159 224 183 9109513 jit.gl.texture v1 @name dv @dim 720 540;
#P newex 42 391 80 9109513 jit.gl.render v1;
#P newex 20 640 288 9109513 jit.window v1 @size 720 540 @grow 0 @fsaa 1 @pos 560 44;
#P window linecount 3;
#P comment 308 290 100 9109513 what appears on the v1 output window should appear here;
#P fasten 11 1 12 0 56 550 25 550;
#P connect 12 0 8 0;
#P fasten 10 0 8 0 160 587 25 587;
#P fasten 29 0 8 0 322 591 25 591;
#P connect 36 0 8 0;
#P connect 7 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 9 0;
#P connect 14 0 2 0;
#P connect 9 1 2 0;
#P connect 9 0 2 0;
#P connect 22 0 2 0;
#P connect 5 0 2 0;
#P connect 2 0 21 0;
#P connect 30 0 6 1;
#P connect 4 1 18 0;
#P connect 33 0 17 0;
#P connect 18 0 17 0;
#P connect 15 0 14 1;
#P connect 19 0 15 0;
#P connect 13 0 10 0;
#P connect 18 1 16 0;
#P connect 23 0 3 0;
#P connect 16 0 3 0;
#P connect 15 0 14 2;
#P fasten 4 2 24 0 403 435 178 435;
#P connect 38 0 24 0;
#P connect 24 0 36 0;
#P connect 15 0 14 3;
#P connect 37 0 23 0;
#P connect 17 0 20 0;
#P connect 31 0 23 1;
#P connect 32 0 23 2;
#P connect 37 0 33 0;
#P connect 27 0 26 0;
#P connect 26 0 28 0;
#P connect 28 0 29 0;
#P connect 34 0 33 1;
#P connect 35 0 33 2;
#P fasten 4 2 5 0 403 118 440 118;
#P connect 4 1 39 0;
#P connect 39 0 43 0;
#P connect 43 0 40 0;
#P connect 40 0 44 0;
#P connect 42 0 41 0;
#P connect 43 1 41 0;
#P window clipboard copycount 45;


May 23, 2006 | 5:51 pm

this patch, posted in another topic, does not work either. there seems to be some sort of bug with texture readback on this particular video card (ATI x1300 for laptop).

#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P comment 163 512 149 131137545 you should see the same thing here as you do in the "test" window;
#P user jit.pwindow 81 508 82 62 0 1 0 0 1 0;
#P window linecount 1;
#P newex 120 385 48 131137545 loadbang;
#P newex 88 135 56 131137545 s v_rmain;
#P newex 53 71 51 131137545 qmetro 2;
#P user jit.fpsgui 10 130 60 131137545 0;
#P newex 151 255 30 131137545 t b b;
#P newex 76 294 56 131137545 r v_rmain;
#P newex 171 333 283 131137545 jit.gl.videoplane test @rotatexyz 0 180 0 @scale 1 1.001 1.;
#P objectname jit.gl.videoplane;
#P newex 76 333 86 131137545 jit.gl.render test;
#P objectname jit.gl.render;
#P newex 171 300 215 131137545 jit.gl.texture test @name feed @dim 320 240;
#P objectname jit.gl.texture;
#P newex 151 236 48 131137545 loadbang;
#P message 151 274 81 131137545 usetexture feed;
#P newex 53 97 134 131137545 t b erase b to_texture b b b;
#P toggle 36 21 15 0;
#P newex 99 213 255 131137545 jit.gl.gridshape test @shape opencube @poly_mode 1 1;
#P newex 211 78 189 131137545 jit.window test @size 320 240 @fsaa 1;
#P newex 147 187 84 131137545 jit.gl.handle test;
#P button 32 71 15 0;
#N counter 0 359;
#X flags 0 0;
#P newobj 211 144 74 131137545 counter 0 359;
#P newex 147 168 126 131137545 pak rotatexyz 10. 0. -10.;
#P number 115 65 35 9 0 0 0 2001 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 34 615 108 131137545 jit.qt.record 320 240;
#P message 165 615 122 131137545 write ttest.mov 25. jpeg;
#P window linecount 2;
#P comment 177 384 149 131137545 this is needed to write the opengl back into a matrix;
#P window linecount 1;
#P newex 113 435 149 131137545 jit.gl.sketch test @automatic 0;
#P message 112 413 148 131137545 glreadpixels grab 0 0 320 240;
#P newex 84 457 152 131137545 jit.matrix grab 4 char 320 240;
#P newex 86 388 30 131137545 t b b;
#P newex 82 480 303 131137545 jit.matrix @usesrcdim 1 @srcdimstart 0 239 @srcdimend 319 0;
#P message 165 635 29 131137545 stop;
#P comment 56 25 100 131137545 1 – turn on;
#P connect 12 0 11 2;
#P connect 18 6 12 0;
#P connect 21 0 23 0;
#P connect 25 1 21 0;
#P connect 25 0 19 0;
#P connect 20 0 25 0;
#P connect 11 0 14 0;
#P connect 3 1 6 0;
#P connect 5 0 6 0;
#P connect 29 0 5 0;
#P connect 14 0 16 0;
#P connect 18 5 16 0;
#P connect 10 0 27 1;
#P connect 18 3 28 0;
#P connect 18 4 28 0;
#P connect 18 1 28 0;
#P connect 18 2 3 0;
#P connect 3 0 4 0;
#P connect 2 0 9 0;
#P connect 2 0 30 0;
#P connect 4 0 2 0;
#P connect 24 0 22 0;
#P connect 19 0 22 0;
#P connect 13 0 18 0;
#P connect 27 0 18 0;
#P connect 17 0 27 0;
#P connect 1 0 9 0;
#P connect 8 0 9 0;
#P connect 18 0 26 0;
#P window clipboard copycount 32;


May 23, 2006 | 6:14 pm

Hi Peter,

Can you confirm whether or not turning on/off doublebuffer makes any
difference for you?

Another thing worth testing is trying to install the latest ATi
Catalyst drivers. If your laptop doesn’t support them, you might
consider trying the (unofficial/modded) ones from
http://www.omegadrivers.net. These have solved many user’s problems with ATi
laptop cards, though obviously they come without warrantee, and we
can’t officially recommend you use them.

-Joshua


May 23, 2006 | 8:16 pm

catalyst drivers were updated.
ah…the secret switch. yes, that did work on the Dell. i also notice that with it off, the patch freaks out with a lot of blinking on my Mac 9800 ATI.
is there a short version of "why" it works on the lappy?


May 23, 2006 | 8:40 pm

Good to know. Might be a weird problem with which buffer is valid for
reading (front vs. back). We’ll investigate further for the next update.

Thanks,
Joshua


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