Re: Grabbing buffer image in multi-pipe , multi-chan env.

New Message Reply Date view Thread view Subject view Author view

Rob Jenkins (robj++at++quid.engr.sgi.com)
Fri, 13 Mar 1998 08:38:19 -0800


On Mar 11, 11:33pm, Comm'der Tomalak wrote:
> Subject: Grabbing buffer image in multi-pipe , multi-chan env.
>
>
> Hi there :)
>
> I'd like to know how can I grab, for image processing purposes,
> the output of a pipe/chan in a multpipe, multichan simulation.
>
> What I'm looking for, is a function whoich, given a pipe/chan,
> gives me a GL window memory buffer and enables me to copy that, after
> processed, to another GL Window.
>

The source for pfuSaveImage is shipped in
/usr/share/Performer/src/lib/libpfutil/snapwin.c that function does
glReadpixels then writes the data to an rgb file, it wouldn't be hard to change
the write to file part to be whatever OpenGL image processing you want on that
data read by glReadpixels. If you want to do it in another GL window ( or even
offscreen pbuffer ) you can do glXMakeCurrentReadSGI from the 2nd window to
make the performer context readable, then do the glReadpixels from the 2nd
window and you'll have copied the pixel data to the 2nd context. You can then
process it or do some processing ( see man pages for things like
glPixelTransfer, glPixelZoom, glConvolutionFilter ). There's no reason that the
2nd window shouldn't be a performer channel too.

Cheers
Rob

-- 
________________________________________________________________
Rob Jenkins mailto:robj++at++sgi.com
Silicon Graphics, Mtn View, California, USA
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:01 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.