fix Model bugs exposed by use in NoteDisplay

This commit is contained in:
Chris Danford
2003-09-23 05:39:24 +00:00
parent 31e4d6757d
commit cda57e7c5d
2 changed files with 20 additions and 3 deletions
+18 -2
View File
@@ -590,10 +590,21 @@ void Model::DrawPrimitives()
if(m_Meshes.empty())
return; // bail early
/* Don't if we're fully transparent */
if( m_temp.diffuse[0].a <= 0.001f )
return;
Actor::SetRenderStates(); // set Actor-specified render states
DISPLAY->Scale( 1, -1, 1 ); // flip Y so positive is up
//////////////////////
// render the diffuse pass
//////////////////////
DISPLAY->SetTextureModeModulate();
for (int i = 0; i < (int)m_Meshes.size(); i++)
{
msMesh *pMesh = &m_Meshes[i];
@@ -657,8 +668,13 @@ void Model::DrawPrimitives()
DISPLAY->DrawIndexedTriangles( &TempVertices[0], pMesh->Vertices.size(), (Uint16*)&pMesh->Triangles[0], pMesh->Triangles.size()*3 );
}
DISPLAY->SetZBuffer( false );
//////////////////////
// render the glow pass
//////////////////////
if( m_temp.glow.a > 0.0001f )
{
// TODO: Support glow.
}
}
void Model::SetDefaultAnimation( CString sAnimation, float fPlayRate )