Re: buffer requirment for glPolygonOffsetEXT

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++sgi.com)
Fri, 05 Mar 1999 16:29:10 -0800


There is no requirement, other than a depth buffer.

Watch your z precision as the EXT version will vary depending on z bits.

Also multisample on iR triggers a different z storage mechanism which
improves precision in the distance and will affect the required offset.

You can choose to use pfLayers for this, watch that performer may be
clobbering your layter information, it makes it's own offset calls.

If using pfLayers you could try using the stencil layering instead of
offset, the default pf offset values chosen don't work very well on iR
because they are excessively large and cause punch through (too much
offset), this should be fixed in the 2.2.5 release, and OpenGL 1.1
platforms will use the precision independent 1.1 OpenGL ARB offset
instead of the old EXT offset in the next release.

Cheers,Angus.

Liu Xiaoyan wrote:
>
> Hi, all,
>
> I'm trying to do the same light mapping effect as that in
> Bumplogo on our VR platform (CAVE). Two coplanar textured
> polygons are offsetted using glPolygonOffsetEXT before they
> are blended. I tested this very simple part with different
> framebuffer setup. It works in Performer but not in CAVE. In
> CAVE, I can only see the front polygon without any blending.
> I suspect it's due to different framebuffer configurations.
>
> What's the buffer requirement for gl-polygon_offset
> extension and glTexEnvfv(ENV_BIAS_SGIX)? Does it need
> stencil?
>
> static int PreBlend(pfTraverser *, void *)
> { pfTransparency(PFTR_BLEND_ALPHA);
> pfOverride(PFSTATE_TRANSPARENCY, PF_ON);
> glBlendFunc(GL_ZERO, GL_SRC_COLOR);
> glPolygonOffsetEXT(-0.5f, -0.00001f);
> glEnable(GL_POLYGON_OFFSET_EXT);
> glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_BIAS_SGIX,
> biasparams);
> glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR,
> colorparams);
> return PFTRAV_CONT;
> }
>
> static int PostBlendC(pfTraverser *, void *)
> {
> glBlendFunc(GL_ONE, GL_ZERO);
> pfOverride(PFSTATE_TRANSPARENCY, PF_OFF);
> pfTransparency(PFTR_OFF);
> glDisable(GL_POLYGON_OFFSET_EXT);
> glPolygonOffsetEXT(0.0f, 0.0f);
> return PFTRAV_CONT;
> }
>
> Thanks.
>
> Liu
> --
> ***********************************************************************
>
> Liu Xiaoyan Institute of High
> Performance Computing
> Research Engineer National University
> of Singapore
> Data Visualisation Group http://www.ihpc.nus.edu.sg
> Tel:(65)7709267
> ***********************************************************************
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
"Only the mediocre are always at their best." -- Jean Giraudoux

For advanced 3D graphics Performer + OpenGL based examples and tutors: http://www.dorbie.com/


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Fri Mar 05 1999 - 16:29:13 PST

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