Dear List,
I'm currently working on a project which involves GEM for the visual part. I would like to realize a scrolling image say from left to right where on the left side the edge is constantly fed with new rows of pixels. Ideally I would like to have everything on a texture so that it runs quick. I dug a bit into the help files about textures and got quickly the scrolling part working (see attached patch). Now I wonder how to feed the scrolling texture one one side with new rgb values. I found that there is a wrapper for the OpenGL command glCopyTexImage2D but I have no idea how to feed the 8 inlets with the appropriate arguments. I have some knowledge about PD/GEM and a working knowledge about OpenGL. I just have difficulties to bring them together.
Any help and hints very much appreciated,
Thanks,
Florian
#N canvas 640 22 650 636 10; #X obj 14 123 gemwin; #X msg 14 18 create; #X obj 152 53 gemhead; #X msg 14 38 destroy; #X msg 28 57 1; #X msg 28 77 0; #X obj 181 281 pix_coordinate; #X obj 181 225 pix_texture; #N canvas 91 174 290 179 Gem.init 0; #X obj 83 30 loadbang; #X msg 161 76 reset; #X obj 45 107 outlet; #X msg 45 75 dimen 300 300; #X obj 88 51 t b b; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 3 0 2 0; #X connect 4 0 3 0; #X connect 4 1 1 0; #X restore 28 97 pd Gem.init; #X text 290 188 set the texture coordinates [x1 y1 x2 y2 x3 y3 x4 y4] ; #X msg 205 137 quality $1; #X obj 205 118 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 180 140 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X obj 224 95 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X msg 180 159 client_storage $1; #X msg 224 114 repeat $1; #X obj 181 303 square 5; #X obj 152 76 pix_image C:/Programme/pd/doc/8.gem/data/fractal.JPG ; #N canvas 157 510 646 332 texturecords 0; #X obj 120 38 inlet; #X obj 157 265 outlet; #X msg 569 140 set $1; #X obj 184 38 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0 10 -262144 -1 -1 58 256; #X msg 465 141 add2 0; #X obj 159 74 t b f f f f f f f f; #X msg 286 143 add2 0; #X msg 149 142 add2 1; #X msg 73 142 add2 $1; #X msg 12 141 add2 1; #X msg 351 151 add2 $1; #X obj 343 127 + 1; #X obj 227 134 + 1; #X msg 209 157 add2 $1; #X msg 173 223 6 0 7 0 7 1 6 1; #X connect 0 0 5 0; #X connect 2 0 14 0; #X connect 3 0 5 0; #X connect 4 0 14 0; #X connect 5 0 14 0; #X connect 5 1 9 0; #X connect 5 2 8 0; #X connect 5 3 7 0; #X connect 5 4 12 0; #X connect 5 5 6 0; #X connect 5 6 11 0; #X connect 5 7 4 0; #X connect 5 8 2 0; #X connect 6 0 14 0; #X connect 7 0 14 0; #X connect 8 0 14 0; #X connect 9 0 14 0; #X connect 10 0 14 0; #X connect 11 0 10 0; #X connect 12 0 13 0; #X connect 13 0 14 0; #X connect 14 0 1 0; #X restore 260 260 pd texturecords; #X msg 260 222 0 , 6 12000; #X obj 260 241 line 0 1; #X obj 282 326 GEMglCopyTexImage2D; #X connect 1 0 0 0; #X connect 2 0 17 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X connect 6 0 16 0; #X connect 7 0 6 0; #X connect 8 0 0 0; #X connect 10 0 7 0; #X connect 11 0 10 0; #X connect 12 0 14 0; #X connect 13 0 15 0; #X connect 14 0 7 0; #X connect 15 0 7 0; #X connect 17 0 7 0; #X connect 18 0 6 1; #X connect 19 0 20 0; #X connect 20 0 18 0;