Brian Furtaw (brian++at++sgi.com)
Wed, 13 Nov 1996 08:57:01 -0500
I don't have the answer for you but I can tell you where to get it, if you go
to the Performer web page (address below) and search this mailing list's
archives you will find that there has been quite a bit of discussion on this
very subject within the last month. You are not alone, who knows this question
may have already made it to the FAQ. I did not pay enough attention to the IR
depth buffer thread, I don't have an IR.
Brian
On Nov 12, 3:00pm, Henry Hoeh wrote:
> Subject: Capturing Depth Buffer on I
>
> Hi Performers,
>
> I am having trouble capturing the depth buffer values on my new IR machine
> with code that works on an RE2.
>
> I am using the perfly application with the minor additions listed below. I
> simply duped the color buffer calls and made them depth buffer calls.
>
> My configuration is as follows:
>
> IRIS 6.2
> Performer 2.1
> Graphics: InfiniteReality
> Compiled with -o32 and OpenGL
> Anti-aliasing (or Multisampling) is off
>
> I am using all of the perfly code unmodified. I copied the file SNAPWIN.C
and
> modified the function pfuSaveImage to capture and write the depth buffer
> values to a file in addition to the color values as follows:
>
>
> scrbuff = (unsigned long *)pfMalloc((unsigned int)(xsize*ysize*sizeof(long)),
> NULL);
> scrzbuff = (unsigned long *)pfMalloc((unsigned
int)(xsize*ysize*sizeof(long)),
> NULL);
>
> glReadBuffer(GL_FRONT);
>
> glReadPixels((short)xorg, (short)yorg, (short)xsize, (short)ysize, GL_RGBA,
> GL_UNSIGNED_BYTE, scrbuf);
>
> glReadPixels((short)xorg, (short)yorg, (short)xsize, (short)ysize,
> GL_DEPTH_COMPONENT, GL_FLOAT, scrzbuf);
>
> fid1 = fopen("test.out", "w");
> for(x=0; x<xsize*ysize, x++)
> status=fprintf(fid1, "Z value: %8x Color: %8x\n", scrzbuf[x],
scrbuf[x]);
> fclose(fid1);
>
>
> When I look at the values in the file, the color values vary with the image
> but the depth values are a constant (0x3f7fffff).
>
> What am I missing? TIA.
>
> Henry
>
>
> =======================================================================
> 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 Henry Hoeh
-- o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-oBrian Furtaw (brian++at++sgi.com) VisSim Technical Consultant 12200-G Plum Orchard Drive Office: (301)572-3293 Fax: (301)872-3293 Silver Spring, Maryland 20904 OpenGL/ImageVision/OpenInventor/Performer ======================================================================= 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:53:56 PDT