Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Tue, 18 Jun 1996 18:30:10 +0100
You can use a single call from the draw process like:
pfSubloadTex(Shared->tex1, PFTEX_SOURCE_FRAMEBUFFER, NULL,
X_POS, Y_POS, 0, 0, TEX_XSIZE, TEX_YSIZE);
I've used this on an iR after a call to pfDraw for a channel.
To make this work on RE2 or IMPACT you'll probably need performer 2.0.1
(also patch 918 on RE2 if OpenGL) but I haven't tried this.
The above isn't the only method of doing this. You should be able to specify
the framebuffer as the image source for a texture and autoload on the apply
using the improved Performer API.
Rgds,
Angus.
On Jun 18, 9:39am, AnitaKishore wrote:
> Subject: Re: Sample code for FB to texture memory copy
> On Jun 18, 9:55am, Todd R Pravata wrote:
> > Subject: Sample code for FB to texture memory copy
> > I know this question comes up alot, but I've never had to
> > do this before:
> >
> > Can someone point me to sample code that loads
> > texture memory with the contents of the frame buffer?
> >
>
>
> I do it in the following way:
>
> 1. read framebuffer with lrectread to get an image array.
> 2. set this image array to a pftexture type variable.
> 3. make sure that this pftexture is properly configured to
> receive the above image array.
> 4. call pfLoadTex in the DRAW process to load this pfTexture
> into the texture memory.
>
> Hope this helps.
>
> -anita
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from AnitaKishore
--
Angus Dorbie,
Software Development Manager,
The Reality Centre,
Silicon Graphics Ltd, UK
dorbie++at++reading.sgi.com
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer.html
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:01 PDT