[PD] pix_snab

IOhannes m zmoelnig zmoelnig at iem.at
Mon Jun 26 09:43:00 CEST 2006


Carles Sora wrote:
> hi list,
> I'm new here,
> 
> I'm trying to put into pix_buffer a screenshot with pix_snab but it 
> doesn't work well,
> the pix_buffer_read draws a black image,
> i thing that could be by the order of render, but i'm not sure
> in the attach file you will see what I say.


several things:
1) you need something rendered into the buffer before you can make a 
meaningful snapshot (if you make a snapshot of an empty gemwin, then the 
image is likely to be black)
2) [pix_buffer_write] will only write the image into the buffer in the 
render cycle immediately after the 2nd inlet gets set. (this is kind a 
means for saving CPU power.) so each time you want to write something 
into the buffer, you will have to bang the index-number you want to 
write too (connect the [snap( with a [bang( to the index)
3) [pix_buffer_read] will only update the image when it is told to do 
so: e.g by (re)setting the index; again, this caching is for performance 
reasons (and probably sometimes annoying); if you want to force the 
buffer to be read each cycle, just send bang the index each render cycle.

hope this helps

,fg,asdr
IOhannes




More information about the Pd-list mailing list