Some housekeeping that EndDraw takes care of wasn't in certain cases. Oops.

This commit is contained in:
Ben "root" Anderson
2013-12-20 17:29:49 -06:00
parent 6e34153a52
commit 65af9f1839
+5 -4
View File
@@ -288,13 +288,15 @@ void Actor::Draw()
this->PreDraw(); this->PreDraw();
ASSERT( m_pTempState != NULL ); ASSERT( m_pTempState != NULL );
if( m_pTempState->diffuse[0].a == 0 && m_pTempState->diffuse[1].a == 0 && m_pTempState->diffuse[2].a == 0 && m_pTempState->diffuse[3].a == 0 ) // This Actor is fully transparent if( m_pTempState->diffuse[0].a != 0 || m_pTempState->diffuse[1].a != 0 || m_pTempState->diffuse[2].a != 0 || m_pTempState->diffuse[3].a != 0 ) // This Actor is not fully transparent
return; // early abort {
// call the most-derived versions // call the most-derived versions
this->BeginDraw(); this->BeginDraw();
this->DrawPrimitives(); // call the most-derived version of DrawPrimitives(); this->DrawPrimitives(); // call the most-derived version of DrawPrimitives();
this->EndDraw(); this->EndDraw();
}
m_pTempState = NULL;
} }
void Actor::PreDraw() // calculate actor properties void Actor::PreDraw() // calculate actor properties
@@ -598,7 +600,6 @@ void Actor::SetTextureRenderStates()
void Actor::EndDraw() void Actor::EndDraw()
{ {
DISPLAY->PopMatrix(); DISPLAY->PopMatrix();
m_pTempState = NULL;
} }
void Actor::UpdateTweening( float fDeltaTime ) void Actor::UpdateTweening( float fDeltaTime )