Mismatching render states
by Kevin Johnson · in Torque Game Engine Advanced · 08/14/2006 (8:13 pm) · 2 replies
While porting fxLight over to tse (mostly just for learning exp)
Ive got it in and working...BUT the canonizer says
(when i move the light and camera outside the orcbase)
looking at the the enums
i would assume its :
but doesnt this block of code do that??:
or am i a complete idiot??
k
update
i decided to go brute force with it (inside ::renderObject)
same results..It works fine inside the orcbase..If I comment out my cannonizer it blows up in terrRender::renderblock with the same states bonkered..
Ive got it in and working...BUT the canonizer says
(when i move the light and camera outside the orcbase)
fxLight::renderObject: Mismatching render state #3: 1 != 0 fxLight::renderObject: Mismatching render state #4: 0 != 1 fxLight::renderObject: Mismatching render state #13: 0 != 1
looking at the the enums
enum GFXRenderState
{
GFXRenderState_FIRST = 0,
GFXRSZEnable = 0,
GFXRSFillMode,
GFXRSShadeMode,
GFXRSZWriteEnable,
GFXRSAlphaTestEnable,
...
GFXRSAlphaBlendEnable,
...
GFXRenderState_COUNT ///< Don't use this one, this is a counter
};i would assume its :
GFXRSZWriteEnable, GFXRSAlphaTestEnable, GFXRSAlphaBlendEnable
but doesnt this block of code do that??:
GFX->setZWriteEnable( true ); GFX->setAlphaTestEnable( false ); GFX->setAlphaBlendEnable( false ); GFX->popWorldMatrix(); GFX->popState();
or am i a complete idiot??
k
update
i decided to go brute force with it (inside ::renderObject)
U32 ZWriteState = GFX->getRenderState(3); U32 AlphaTestState= GFX->getRenderState(4); U32 AlphaBlendState = GFX->getRenderState(13); ... //clean up GFX->setZWriteEnable( ZWriteState); GFX->setAlphaTestEnable(AlphaTestState); GFX->setAlphaBlendEnable( AlphaBlendState );
same results..It works fine inside the orcbase..If I comment out my cannonizer it blows up in terrRender::renderblock with the same states bonkered..
Torque Owner Brian Ramage
Black Jacket Games