Liu Xiaoyan (liuxy++at++ihpc.nus.edu.sg)
Fri, 05 Mar 1999 18:36:28 +0800
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 ***********************************************************************
This archive was generated by hypermail 2.0b2 on Fri Mar 05 1999 - 02:41:58 PST