Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Mon, 3 Mar 1997 10:23:43 +0000
glRasterPos3f(0.001f, 1.0f, 0.001f);
glDrawPixels(_IMAGESIZEX, _IMAGESIZEY, GL_RGBA,
GL_UNSIGNED_INT_8_8_8_8_EXT, imagedata);
Or you could create a simple orthographic channel with
no scene and use the above rasterpos in the draw callback
for the channel. This is how you might create the channel
for the above rasterpos and drawpixels
chan = pfNewChan(pfGetPipe(0));
pfChanViewport(chan6, 0.0f, _IMAGESIZEX/WIN_WIDTH,
0.0f, _IMAGESIZEY/WIN_HEIGHT);
pfMakeOrthoChan(chan, 0.0f, _IMAGESIZEX, 0.0f, _IMAGESIZEY);
pfChanNearFar(chan, NEAR, FAR);
pfChanTravFunc(chan, PFTRAV_CULL, CullRasterChan);
pfChanTravFunc(chan, PFTRAV_DRAW, DrawRasterChan);
Cheers,
Angus.
On Mar 1, 2:00am, Allen Bierbaum wrote:
> Subject: DrawPixel with simple RGB
> Hello all,
> I have seen several threads in the past months about how to use
> glDrawPixels with Performer. But I have not seen a difinitive code
> example demonstrating the "correct" way to do this.
>
> Could someone give me a simple example of how to display an RGB image
> (just an array of RGB floats in memory) in the lower left corner of an
> open window as a post draw function?
>
> Thanks,
> Allen
> --
>
> Allen Bierbaum
> ISU SE Lab
> Research Assistant
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Allen Bierbaum
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
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:54:49 PDT