/**
Do the camera blending.
If one camera is switched to another, apply
alpha blending between to camera pictures.
*/
void CApplication::DoCameraBlending( DWORD dwFlag )
{
// now, set the initial values for blending in
// the constant color/alpha register.
float f = GetCurScene()->GetFadeFactor() ;
glBlendColor( f,f,f,f ) ;
switch( dwFlag )
{
// first render screen
case CAPP_BLEND_ONE:
glBlendEquation( GL_ADD) ;
// blend the screens
glBlendFunc( GL_CONSTANT_COLOR, GL_ZERO ) ;
break;
// second render screen
case CAPP_BLEND_TWO:
//glBlendEquation( GL_LOGIC_OP );
//glLogicOp(GL_OR) ;
//glBlendEquation( GL_FUNC_SUBTRACT );
// blend the screens
glBlendEquation( GL_LOGIC_OP );
glLogicOp(GL_INVERT) ;
glBlendFunc( GL_ONE_MINUS_CONSTANT_COLOR, GL_SRC_COLOR ) ;
//glBlendEquation( GL_FUNC_SUBTRACT ) ;
break ;
}
}
glBlendEquation( GL_LOGIC_OP );
glLogicOp(GL_INVERT) ;
The next one looks extream bad! It looks like a depth buffer problem.
Maybe someone could give me some hint, how I can solve this ugly problem!?!? Grateful Alex [Edited by - directNoob on May 23, 2007 6:46:24 PM]