---------- Forwarded message ----------
From: Carles Sora <carlesora(a)gmail.com>
Date: Jun 26, 2006 2:52 PM
Subject: Re: [PD] pix_snab
To: IOhannes m zmoelnig <zmoelnig(a)iem.at>
i have understood all your points, thanks iOhannes,
now: if i put an image from a pix_film directly to the buffer_write then i
can read fine from the buffer,
but if i put the pix_film across a texture and then a snap, (see patch) the
result of the buffer is black again,
maybe because the snap it's not in the good place??? or because x,y of snap
are bad??
thanks,
carles
On 6/26/06, IOhannes m zmoelnig <zmoelnig(a)iem.at> wrote:
>
> 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
>
--
..............................................................................
--
..............................................................................