From: Christopher Lindinger (Christopher.Lindinger++at++aec.at)
Date: 05/28/2002 08:59:23
hello pfall, just to confront you with a little problem:
i wanted to make use of the pfGeoState postfuncs to do some
ONE/ONE - blending for texture fading.
this is my postfunc i use for the 2nd pass object:
int my_postfunc_blend_one_one_lequal( pfGeoState * state, void * data )
{
glBlendFunc( GL_ONE, GL_ONE );
glDepthFunc( GL_LEQUAL );
}
and this is the setting of the gstates
(transp is 1 for the 2nd pass geometry, 0 otherwise):
if( transp ){
my_gstate->setMode( PFSTATE_TRANSPARENCY, PFTR_BLEND_ALPHA | PFTR_NO_OCCLUDE );
my_gstate->setFuncs( (pfGStateFuncType)0, my_postfunc_blend_one_one_lequal, (void *)0 );
} else {
my_gstate->setFuncs( (pfGStateFuncType)0, (pfGStateFuncType)0, (void *)0 );
}
to ensure that the 2nd pass geometry is drawn second:
if( transp ){
gset->setDrawBin(PFSORT_TRANSP_BIN);
} else {
gset->setDrawBin(PFSORT_OPAQUE_BIN);
}
unfortunately in some viewpositions some faces of the 2nd pass object
are drawn in advance and then overwritten by the non-blended 1st object
(or at least i only see the non blended faces).
any idea what is wrong? or how do i solve this?
thanks
christopher
--- ars electronica futurelab
This archive was generated by hypermail 2b29 : Tue May 28 2002 - 08:59:48 PDT