hi there,
with regard to this thread: http://lists.puredata.info/pipermail/pd-list/2006-09/041759.html
i'm aware of pix_resize, but this object is slow as hell and only resizes to the next power of two. i'm looking for something that does a fast resize to an arbitrary size - my plan is to cut the time it takes the pix_buffer-objects to store and recall textures.
on a related note: is it possible to buffer textures created by pix_buffer_read so that the texture will only be updated if the content of the buffer has actually changed? i figured that it might be enough to only snap every 4th frame and use a buffered version of the textures for the other render cycles ... but pix_buffer_read does the texture upload every render cycle, and i couldn't get pix_buf to actually buffer a texture ... i'm probably making not much sense here, please have a look at the attached patch to see what i'm up to.
thank you very much for your input, thoralf.
___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html
I am getting a seizure from that patch. You want to resize images load them into pix_buffer and then only update the texture every few frames?
Since the image is already a file in the filesystem can you run a script for something like imagemagick to resize them? Maybe we can find some decent resizing code in a GPL app and use that in place of pix_resize...
cgc
On 9/6/06, Thoralf Schulze thoralf_schulze@yahoo.de wrote:
hi there,
with regard to this thread: http://lists.puredata.info/pipermail/pd-list/2006-09/041759.html
- is there a way to resize a texture in gem?
i'm aware of pix_resize, but this object is slow as hell and only resizes to the next power of two. i'm looking for something that does a fast resize to an arbitrary size - my plan is to cut the time it takes the pix_buffer-objects to store and recall textures.
on a related note: is it possible to buffer textures created by pix_buffer_read so that the texture will only be updated if the content of the buffer has actually changed? i figured that it might be enough to only snap every 4th frame and use a buffered version of the textures for the other render cycles ... but pix_buffer_read does the texture upload every render cycle, and i couldn't get pix_buf to actually buffer a texture ... i'm probably making not much sense here, please have a look at the attached patch to see what i'm up to.
thank you very much for your input, thoralf.
hi chris,
I am getting a seizure from that patch. You want to
i take this as a compliment :-)
resize images load them into pix_buffer and then only update the texture every few frames?
no, my intention is still to create some organic-looking video stuff by doing feedback: draw something, take a snapshot of the render buffer and use this as texture for a rectangle in the background of the picture in the next render cycle. the pix_image in the attached patch was only there to simplify things ...
since both pix_buffer_read and pix_buffer_write are tremendous resource hogs, i came up with the idea of resizing the texture and/or updating it only every nth frame (is this possible at all?). pix_buffering a texture larger than 400x300 pixels every render cycle causes serious midi delays on my machine, which has only 4xagp (which is probably the bottleneck here).
something like imagemagick to resize them? Maybe we can find some decent resizing code in a GPL app and use that in place of pix_resize...
yeah, that would be really cool. maybe we could borrow something form the avisynth people (www.avisynth.org). there are quite a few resizing algorithms available in that package, ranging from dumb linear resizing to spline-based algorithms: http://www.avisynth.org/Resize
with kind regards, thoralf.
___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html
On 9/6/06, Thoralf Schulze thoralf_schulze@yahoo.de wrote:
no, my intention is still to create some organic-looking video stuff by doing feedback: draw something, take a snapshot of the render buffer and use this as texture for a rectangle in the background of the picture in the next render cycle. the pix_image in the attached patch was only there to simplify things ...
i think pix_snap2tex is really more appropriate for feedback. I'm not surewhat you plan to do with pix_buffer.
since both pix_buffer_read and pix_buffer_write are
tremendous resource hogs,
In what way? pix_buffer can take a lot of RAM but should take little CPU time.
i came up with the idea of
resizing the texture and/or updating it only every nth frame (is this possible at all?). pix_buffering a texture larger than 400x300 pixels every render cycle causes serious midi delays on my machine, which has only 4xagp (which is probably the bottleneck here).
The problem with audio and midi is that GEM will tie up Pd for longer than the time slicing for audio or data. However, 400x300 is not a huge amount of pixels to move to the GPU. What sort of hardware is this happening with?
yeah, that would be really cool. maybe we could borrow something form the avisynth people (www.avisynth.org ). there are quite a few resizing algorithms available in that package, ranging from dumb linear resizing to spline-based algorithms: http://www.avisynth.org/Resize
A problem with a lot of the avisynth and vdub code is that it is really not designed for real time use at all. I forget which deinterlacer I was looking at but it took ages to do a 720x480 frame, which is fine for overnight batch encodes down to bitorrent size but pretty useless for real-time. It did look pretty nice though.
cgc
hi chris,
i think pix_snap2tex is really more appropriate for feedback. I'm not surewhat you plan to do with pix_buffer.
and put it as a texture on a rectangle filling the gem win as the first thing 4. goto 1. :-)
we talked about using pix_snap2tex for this purpose already (and ruled out its usage pretty much): http://lists.puredata.info/pipermail/pd-list/2006-08/041727.html . if there is a way to do feedback with pix_snap2tex, i'd very interested to learn about it.
since both pix_buffer_read and pix_buffer_write
are
tremendous resource hogs,
In what way? pix_buffer can take a lot of RAM but should take little CPU time. The problem with audio and midi is that GEM will tie up Pd for longer than the time slicing for audio or data. However,
is there any way of untying pd and gem? threads come to my mind, if one is blessed with recent hardware, these could even run on different cores ... and with a 4-core-amd, even tcl/tk could run on its own core. pretty close to paradise :-)
400x300 is not a huge amount of pixels to move to the GPU. What sort of hardware is this happening with?
p4 (northwood)@2.53 ghz, geforce 5700u (with the mainboard supporting only 4xagp). running the attached patch (hope it doesn't get you in a bad condition yet again, please consider it as a proof of concept) causes the following cpu usage here (pd 0.39.2, latest gem cvs on win 2k; couldn't test in linux yet): at 320x240, 20fps: 20% 400x300, 20fps: ~28% 400x300, 30fps (does look a lot better than 20): ~40% from here on, the patch cannot be controlled with an usb midi controller in a meaningful way any more ... 640x480, 20fps: ~48% 800x600, 20fps: ~60%
interestingly enough, when using the m$ sound mapper istead of creative asio as pd's sound drivers, midi is fine even at 800x600. but the latencies are way beyond realtime.
(www.avisynth.org ).
A problem with a lot of the avisynth and vdub code is that it is really not designed for real time use at all. I forget which
yeah, those peoples first concern is quality :-) however, decoding a movie might is probably more expensive than decently resizing it afterwards. and doing so is supposed to save some processing time in the following pix_- objects ... i usually use lanczos4resize in my avs-scripts, which i remember as being quite fast. a (simple) bicubic resizer should be even faster.
with kind regards, thoralf.
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
On 9/8/06, Thoralf Schulze thoralf_schulze@yahoo.de wrote:
we talked about using pix_snap2tex for this purpose already (and ruled out its usage pretty much): http://lists.puredata.info/pipermail/pd-list/2006-08/041727.html . if there is a way to do feedback with pix_snap2tex, i'd very interested to learn about it.
In the GEM examples 07.texture/07.feedback.pd and also 08.motionblur.pd ?
I modified the patch to do feedback for motion blur using pix_snap2tex. Takes about 1% CPU on the PC (P4 3.4 ATI 9600) here. Is this what you want to do?
Chris~
Thanks for the patch, this one's really fun to play with!
~Kyle
On 9/8/06, chris clepper cgclepper@gmail.com wrote:
I modified the patch to do feedback for motion blur using pix_snap2tex. Takes about 1% CPU on the PC (P4 3.4 ATI 9600) here. Is this what you want to do?
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
chris clepper a écrit :
I modified the patch to do feedback for motion blur using pix_snap2tex.
Takes about 1% CPU on the PC (P4 3.4 ATI 9600) here. Is this what you want to do?
Hello, i don't what it was intended to do, but pix-snap2tex captures the reversed desktop of another computer in network that is running with VNC viewer (using winXP pd-40-test-7). Is it normal? Also the CPU is running at 112% with a laptop amd64, and a s3 trident 64Mo graphical card. If I modify the frame number, the cpu calms down at 6%, if I close VNC viewer, nothing is appearing on the rectangl's capturing texture.
___________________________________________________________________________ Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire. http://fr.mail.yahoo.com
Thoralf Schulze a écrit :
hi there,
with regard to this thread: http://lists.puredata.info/pipermail/pd-list/2006-09/041759.html
- is there a way to resize a texture in gem?
i'm aware of pix_resize, but this object is slow as hell and only resizes to the next power of two.
GEMglTextCoord2f for example resizes a texture, GEMglTexParameterf could be use for different kinds of texturing, no latency, no power of two. attached patch uses these two openGL functions.
Patco.
#N canvas 424 23 566 309 10; #N canvas 0 22 450 300 gemwin 0; #X obj 132 136 gemwin; #X obj 67 89 outlet; #X obj 67 10 inlet; #X obj 67 41 route create; #X msg 67 70 set destroy; #X msg 142 68 set create; #X msg 132 112 create , 1; #X msg 198 112 destroy; #X connect 2 0 3 0; #X connect 3 0 4 0; #X connect 3 0 6 0; #X connect 3 1 5 0; #X connect 3 1 7 0; #X connect 4 0 1 0; #X connect 5 0 1 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X restore 11 30 pd gemwin; #X msg 11 11 create; #X obj 131 600 GEMglEnd; #X floatatom 190 263 5 0 0 0 - - -; #X obj 128 292 GEMglRotatef 0 1 1 1; #X floatatom 226 265 5 0 0 0 - - -; #X floatatom 263 266 5 0 0 0 - - -; #X obj 299 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 2600 1; #X obj 287 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 2500 1; #X obj 312 334 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 2000 1; #X obj 381 394 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 369 394 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 394 394 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 128 7 gemhead 50; #X obj 206 311 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 218 311 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3500 1; #X obj 335 350 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3700 1; #X obj 348 350 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3100 1; #X obj 261 443 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3900 1; #X obj 274 443 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 303 474 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 291 474 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 316 474 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 0 1; #X obj 272 531 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3900 1; #X obj 285 531 vsl 10 40 -1 1 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 2800 1; #X obj 315 563 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 2200 1; #X obj 303 563 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 3300 1; #X obj 328 563 vsl 10 40 -3 3 0 0 empty empty empty 0 -8 0 8 -262144 -1 -1 1200 1; #X obj 128 394 GEMglVertex3f -2 -1 0; #X obj 128 458 GEMglVertex3f -2 1 0; #X obj 131 531 GEMglVertex3f 0 1 0; #X obj 131 578 GEMglVertex3f 0 -1 0; #X obj 132 499 GEMglTexCoord2f 0.9 0.65; #X obj 128 425 GEMglTexCoord2f 0.02 0.65; #X floatatom 415 491 5 0 0 0 - - -; #X obj 131 555 GEMglTexCoord2f 0.9 0.02; #N canvas 261 145 671 416 image 0; #X obj 305 28 cnv 15 200 100 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 46 18 inlet; #X obj 47 306 outlet; #X obj 46 87 pix_texture; #X obj 46 65 pix_image; #X obj 127 28 openpanel; #X msg 128 51 open $1; #X obj 345 47 hradio 15 1 0 2 $0-radio-values $0-radio-values-r value -37 6 0 8 -262144 -1 -1 0; #X obj 373 31 hradio 15 1 0 5 empty $0-radio-parameter parameter -65 6 0 8 -262144 -1 -1 0; #N canvas 336 51 692 558 TEXTURE_2D 0; #X obj 111 1 inlet; #X obj 300 121 cnv 15 200 20 empty $0-cnv-parameter GL_TEXTURE_WRAP_S 2 12 0 9 -1 -262144 0; #N canvas 509 40 514 394 MAG_FILTER 0; #X obj 60 12 inlet; #X obj 77 290 t b a; #X obj 80 136 sel 0; #X obj 79 66 inlet; #X msg 140 187 GL_NEAREST; #X msg 116 208 GL_LINEAR; #X obj 144 262 list trim; #X obj 144 241 list prepend label; #X obj 64 345 outlet; #X obj 60 41 sel 2; #X obj 264 100 s $0-cnv-parameter; #X msg 264 67 label GL_TEXTURE_MAG_FILTER; #X obj 60 100 i 0; #X obj 144 284 s $0-cnv-value; #X obj 221 158 s $0-radio-values-r; #X obj 60 321 pack 10240 9728; #X msg 47 190 9728; #X msg 66 218 9729; #X connect 0 0 9 0; #X connect 1 0 15 0; #X connect 1 1 15 1; #X connect 2 0 5 0; #X connect 2 0 16 0; #X connect 2 1 4 0; #X connect 2 1 17 0; #X connect 3 0 2 0; #X connect 3 0 12 1; #X connect 4 0 7 0; #X connect 5 0 7 0; #X connect 6 0 13 0; #X connect 7 0 6 0; #X connect 9 0 11 0; #X connect 9 0 12 0; #X connect 11 0 10 0; #X connect 12 0 2 0; #X connect 12 0 14 0; #X connect 15 0 8 0; #X connect 16 0 1 0; #X connect 17 0 1 0; #X restore 142 193 pd MAG_FILTER; #X obj 179 89 inlet; #N canvas 424 253 518 398 WRAP_T 0; #X obj 60 12 inlet; #X obj 66 275 t b a; #X obj 78 145 sel 0; #X obj 79 71 inlet; #X obj 132 257 list trim; #X obj 132 236 list prepend label; #X obj 53 330 outlet; #X msg 108 207 GL_CLAMP; #X msg 132 186 GL_REPEAT; #X obj 132 279 s $0-cnv-value; #X obj 60 38 sel 1; #X obj 264 100 s $0-cnv-parameter; #X msg 264 67 label GL_TEXTURE_WRAP_T; #X obj 60 103 i 0; #X obj 212 139 s $0-radio-values-r; #X obj 49 306 pack 10243 10496; #X msg 15 187 10496; #X msg 59 184 10497; #X connect 0 0 10 0; #X connect 1 0 15 0; #X connect 1 1 15 1; #X connect 2 0 7 0; #X connect 2 0 16 0; #X connect 2 1 8 0; #X connect 2 1 17 0; #X connect 3 0 2 0; #X connect 3 0 13 1; #X connect 4 0 9 0; #X connect 5 0 4 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 10 0 12 0; #X connect 10 0 13 0; #X connect 12 0 11 0; #X connect 13 0 2 0; #X connect 13 0 14 0; #X connect 15 0 6 0; #X connect 16 0 1 0; #X connect 17 0 1 0; #X restore 124 166 pd WRAP_T; #X obj 123 332 outlet; #X obj 181 110 demux 0 1 2 3 4; #N canvas 0 0 478 328 hdial 0; #X obj 64 21 inlet; #X msg 14 169 number $1; #X msg 18 139 2; #X msg 76 137 4; #X msg 47 138 6; #X obj 7 76 sel 0 1 2 3 4; #X obj 10 193 s $0-radio-values-r; #X connect 0 0 5 0; #X connect 1 0 6 0; #X connect 2 0 1 0; #X connect 3 0 1 0; #X connect 4 0 1 0; #X connect 5 0 2 0; #X connect 5 1 2 0; #X connect 5 2 2 0; #X connect 5 3 4 0; #X connect 5 4 3 0; #X restore 220 49 pd hdial value; #N canvas 162 177 538 418 WRAP_S 0; #X obj 60 12 inlet; #X obj 70 284 t b a; #X obj 82 154 sel 0; #X obj 82 89 inlet; #X obj 134 245 list trim; #X obj 134 224 list prepend label; #X obj 57 339 outlet; #X msg 106 191 GL_CLAMP; #X msg 130 170 GL_REPEAT; #X obj 134 267 s $0-cnv-value; #X obj 60 35 sel 0; #X obj 264 100 s $0-cnv-parameter; #X msg 264 67 label GL_TEXTURE_WRAP_S; #X obj 75 121 i 0; #X obj 221 158 s $0-radio-values-r; #X msg 56 253 10496; #X msg 82 227 10497; #X obj 53 315 pack 10242 10496; #X connect 0 0 10 0; #X connect 1 0 17 0; #X connect 1 1 17 1; #X connect 2 0 7 0; #X connect 2 0 15 0; #X connect 2 1 8 0; #X connect 2 1 16 0; #X connect 3 0 2 0; #X connect 3 0 13 1; #X connect 4 0 9 0; #X connect 5 0 4 0; #X connect 7 0 5 0; #X connect 8 0 5 0; #X connect 10 0 12 0; #X connect 10 0 13 0; #X connect 12 0 11 0; #X connect 13 0 2 0; #X connect 13 0 14 0; #X connect 15 0 1 0; #X connect 16 0 1 0; #X connect 17 0 6 0; #X restore 110 137 pd WRAP_S; #N canvas 431 0 587 505 MIN_FILTER 0; #X obj 15 11 inlet; #X obj 32 352 t b a; #X obj 33 79 inlet; #X msg 333 306 GL_NEAREST; #X msg 316 325 GL_LINEAR; #X obj 337 381 list trim; #X obj 337 360 list prepend label; #X obj 19 407 outlet; #X obj 34 180 sel 0 1 2 3 4 5; #X msg 359 266 GL_LINEAR_MINMAP_LINEAR; #X obj 316 188 sel 0 1 2 3 4 5; #X obj 337 403 s $0-cnv-value; #X obj 266 75 s $0-cnv-parameter; #X obj 15 33 sel 3; #X msg 266 42 label GL_TEXTURE_MIN_FILTER; #X obj 29 125 i 0; #X obj 153 181 s $0-radio-values-r; #X obj 16 383 pack 10241 9728; #X msg 33 319 9728; #X msg 45 295 9729; #X msg 63 269 9984; #X msg 90 224 9986; #X msg 103 202 9987; #X msg 76 244 9985; #X msg 344 286 GL_NEAREST_MINMAP_NEAREST; #X msg 374 247 GL_NEAREST_MINMAP_LINEAR; #X msg 384 228 GL_LINEAR_MINMAP_LINEAR; #X connect 0 0 13 0; #X connect 1 0 17 0; #X connect 1 1 17 1; #X connect 2 0 8 0; #X connect 2 0 10 0; #X connect 2 0 15 1; #X connect 3 0 6 0; #X connect 4 0 6 0; #X connect 5 0 11 0; #X connect 6 0 5 0; #X connect 8 0 18 0; #X connect 8 1 19 0; #X connect 8 2 20 0; #X connect 8 3 23 0; #X connect 8 4 21 0; #X connect 8 5 22 0; #X connect 9 0 6 0; #X connect 10 0 4 0; #X connect 10 1 3 0; #X connect 10 2 24 0; #X connect 10 3 9 0; #X connect 10 4 25 0; #X connect 10 5 26 0; #X connect 13 0 14 0; #X connect 13 0 15 0; #X connect 14 0 12 0; #X connect 15 0 8 0; #X connect 15 0 10 0; #X connect 15 0 16 0; #X connect 17 0 7 0; #X connect 18 0 1 0; #X connect 19 0 1 0; #X connect 20 0 1 0; #X connect 21 0 1 0; #X connect 22 0 1 0; #X connect 23 0 1 0; #X connect 24 0 6 0; #X connect 25 0 6 0; #X connect 26 0 6 0; #X restore 161 219 pd MIN_FILTER; #X obj 300 100 cnv 15 200 20 empty empty GL_TEXTURE_2D 2 12 0 9 -1 -262144 0; #N canvas 212 28 614 549 BORDER_COLOR 0; #X obj 271 15 inlet; #X obj 300 118 inlet; #X obj 348 257 list trim; #X obj 348 236 list prepend label; #X obj 215 354 outlet; #X obj 348 279 s $0-cnv-value; #X obj 313 87 s $0-cnv-parameter; #X msg 311 66 label GL_TEXTURE_BORDER_COLOR; #X obj 229 181 demux 0 1 2 3; #X obj 352 169 sel 0 1 2 3; #X msg 351 202 RED; #X msg 376 200 GREEN; #X msg 414 200 BLUE; #X msg 446 201 ALPHA; #X obj 146 147 r $0-BORDER_COLOR; #X obj 253 241 t b a; #X obj 277 267 t b a; #X obj 302 291 t b a; #X obj 43 274 t b b; #X obj 271 38 sel 4; #X obj 18 252 sel 4; #X obj 18 380 i $0; #X obj 271 142 i 0; #X msg 68 300 clear; #X obj 24 461 s pd-TEXTURE_2D-value; #X obj 43 350 i $0; #X obj 89 332 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 18 300 t b b; #X msg 63 379 obj 100 100 cnv 15 200 20 empty $1-cnv-value empty 2 11 0 9 -1 0 0; #X obj 360 147 s $0-radio-values-r; #X floatatom 107 202 5 0 0 0 - - -; #X msg 16 418 obj 170 102 hsl 101 15 0 1 0 0 $1-BORDER_COLOR $1-BORDER_COLOR-r empty 50 6 2 8 0 -1 -1 0; #X obj 211 328 pack 0 0 0 0; #X connect 0 0 19 0; #X connect 0 0 20 0; #X connect 1 0 9 0; #X connect 1 0 8 1; #X connect 1 0 22 1; #X connect 2 0 5 0; #X connect 3 0 2 0; #X connect 7 0 6 0; #X connect 8 0 32 0; #X connect 8 1 15 0; #X connect 8 2 16 0; #X connect 8 3 17 0; #X connect 9 0 10 0; #X connect 9 1 11 0; #X connect 9 2 12 0; #X connect 9 3 13 0; #X connect 10 0 3 0; #X connect 11 0 3 0; #X connect 12 0 3 0; #X connect 13 0 3 0; #X connect 14 0 30 0; #X connect 14 0 8 0; #X connect 15 0 32 0; #X connect 15 1 32 1; #X connect 16 0 32 0; #X connect 16 1 32 2; #X connect 17 0 32 0; #X connect 17 1 32 3; #X connect 18 0 25 0; #X connect 18 1 23 0; #X connect 19 0 7 0; #X connect 19 0 22 0; #X connect 20 0 27 0; #X connect 20 1 18 0; #X connect 21 0 31 0; #X connect 22 0 8 1; #X connect 22 0 9 0; #X connect 22 0 29 0; #X connect 23 0 24 0; #X connect 25 0 28 0; #X connect 26 0 25 0; #X connect 27 0 21 0; #X connect 28 0 24 0; #X connect 31 0 24 0; #X connect 32 0 4 0; #X restore 184 254 pd BORDER_COLOR; #N canvas 24 313 506 356 TEXTURE_2D-value 0; #X obj 100 100 cnv 15 200 20 empty 1002-cnv-value GL_CLAMP 2 11 0 9 -1 -262144 0; #X coords 0 -1 1 1 200 20 1 100 100; #X restore 300 140 pd TEXTURE_2D-value; #X obj 111 28 t a a a a a a a; #X text 337 4 megalegoland@yahoo.fr; #X obj 184 333 outlet; #X obj 107 277 unpack f f; #X obj 207 308 pack f f f f; #X obj 184 277 t b a; #X msg 139 308 4100; #X connect 0 0 13 0; #X connect 2 0 16 0; #X connect 3 0 6 0; #X connect 4 0 16 0; #X connect 6 0 8 1; #X connect 6 1 4 1; #X connect 6 2 2 1; #X connect 6 3 9 1; #X connect 6 4 11 1; #X connect 8 0 16 0; #X connect 9 0 16 0; #X connect 11 0 18 0; #X connect 13 0 8 0; #X connect 13 1 4 0; #X connect 13 2 2 0; #X connect 13 3 9 0; #X connect 13 4 11 0; #X connect 13 5 6 1; #X connect 13 6 7 0; #X connect 16 0 5 0; #X connect 16 1 15 0; #X connect 17 0 15 0; #X connect 18 0 19 0; #X connect 18 1 17 0; #X connect 19 0 5 0; #X coords 0 -1 1 1 200 60 1 300 100; #X restore 305 64 pd TEXTURE_2D; #X obj 470 42 bng 15 250 50 0 empty empty open_jpg -20 -6 0 8 -262144 -1 -1; #X msg 203 158 4100; #X text 366 3 border color doesn't work; #X obj 319 213 print tex_parameter; #X obj 499 199 print tex_value; #X obj 45 235 GEMglTexParameterf 3553 10242 10496; #X msg 139 184 3553; #X msg 114 146 3552; #X connect 1 0 4 0; #X connect 3 0 15 0; #X connect 4 0 3 0; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 9 1; #X connect 8 0 9 0; #X connect 9 0 13 0; #X connect 9 0 15 2; #X connect 9 1 14 0; #X connect 9 1 15 3; #X connect 10 0 5 0; #X connect 11 0 15 2; #X connect 15 0 2 0; #X connect 16 0 15 1; #X connect 17 0 15 1; #X coords 0 -1 1 1 200 100 1 305 28; #X restore 128 34 pd image; #X obj 382 45 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X floatatom 370 119 5 0 0 0 - - -; #X obj 128 361 GEMglTexCoord2f -0.5 -0.5; #X text 216 11 a gop for GLdefine GL_TEXTURE_2D and image browsing ; #X obj 128 320 GEMglBegin 9; #X obj 131 621 GEMglShadeModel 7424; #X obj 366 75 GLdefine GL_SPHERE_MAP; #N canvas 548 337 454 304 TexGenf 0; #X obj 117 78 inlet; #X obj 129 249 outlet; #X obj 146 181 GEMglTexGenf; #X msg 225 46 8192; #X msg 216 67 8193; #X msg 210 86 8194; #X msg 203 105 8195; #X text 190 41 S; #X text 184 61 T; #X text 178 83 R; #X text 173 103 Q; #X msg 268 49 9472; #X text 261 32 TEXTURE_GEN_MODE; #X text 353 70 OBJECT_LINEAR; #X msg 360 87 9217; #X msg 378 117 9216; #X text 367 103 EYE_LINEAR; #X msg 326 67 9217; #X text 327 50 SPHERE_MAP; #X connect 0 0 2 0; #X connect 2 0 1 0; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 2 1; #X connect 6 0 2 1; #X connect 11 0 2 2; #X connect 14 0 2 3; #X connect 15 0 2 3; #X connect 17 0 2 3; #X restore 128 175 pd TexGenf; #X connect 0 0 1 0; #X connect 1 0 0 0; #X connect 2 0 42 0; #X connect 3 0 4 1; #X connect 4 0 41 0; #X connect 5 0 4 2; #X connect 6 0 4 3; #X connect 7 0 28 2; #X connect 8 0 28 1; #X connect 9 0 28 3; #X connect 10 0 29 2; #X connect 11 0 29 1; #X connect 12 0 29 3; #X connect 13 0 36 0; #X connect 14 0 34 0; #X connect 14 0 39 1; #X connect 15 0 34 0; #X connect 15 0 39 2; #X connect 16 0 33 1; #X connect 16 0 34 0; #X connect 17 0 33 2; #X connect 17 0 34 0; #X connect 18 0 32 1; #X connect 18 0 34 0; #X connect 19 0 32 2; #X connect 19 0 34 0; #X connect 20 0 30 2; #X connect 21 0 30 1; #X connect 22 0 30 3; #X connect 23 0 35 1; #X connect 24 0 35 2; #X connect 25 0 31 2; #X connect 26 0 31 1; #X connect 27 0 31 3; #X connect 28 0 33 0; #X connect 29 0 32 0; #X connect 30 0 35 0; #X connect 31 0 2 0; #X connect 32 0 30 0; #X connect 33 0 29 0; #X connect 35 0 31 0; #X connect 36 0 44 0; #X connect 37 0 43 0; #X connect 39 0 28 0; #X connect 41 0 39 0; #X connect 43 0 38 0; #X connect 44 0 4 0;
On 9/7/06, Patco megalegoland@yahoo.fr wrote:
Thoralf Schulze a écrit :
hi there,
with regard to this thread: http://lists.puredata.info/pipermail/pd-list/2006-09/041759.html
- is there a way to resize a texture in gem?
i'm aware of pix_resize, but this object is slow as hell and only resizes to the next power of two.
GEMglTextCoord2f for example resizes a texture, GEMglTexParameterf could be use for different kinds of texturing, no latency, no power of two. attached patch uses these two openGL functions.
pix_coordinate does that for regular GEM Geos. Make sure it is _after_ pix_texture.
hi patco,
GEMglTextCoord2f for example resizes a texture, GEMglTexParameterf could be use for different kinds of texturing, no latency, no power of two. attached patch uses these two openGL functions.
thanks a lot for this - i should have a look at the red book again ... btw, gem prints out a "GL: invalid enumerant" every render cycle when running your patch (pd msw-0.39.2, gem cvs-20060412 on win2k). seems to work anyway, though :-)
with kind regards, thoralf.
The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html
Thoralf Schulze a écrit :
btw, gem prints out a "GL: invalid enumerant" every render cycle when running your patch (pd msw-0.39.2, gem cvs-20060412 on win2k). seems to work anyway, though :-)
Yes, this warning has not been fixed yet with my openGL patches, on any puredata version, but it works, I will let the list know when my openGL patches will be fully efficient, it's about making a set of patches to ease openGL coding with pd/GEM. I still didn't try pix_coordinates yet, maybe it's better for your project.
___________________________________________________________________________ Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. http://fr.answers.yahoo.com