add spherical environment mapping

This commit is contained in:
Chris Danford
2004-01-06 19:54:13 +00:00
parent 96aa6fa168
commit 882406afe8
7 changed files with 55 additions and 0 deletions
+5
View File
@@ -284,6 +284,8 @@ bool Model::LoadMilkshapeAscii( CString sPath )
}
strcpy( Material.szName, szName );
Material.bSphereMapped = ((CString)Material.szName).Find("sphere") != -1;
// ambient
if( f.GetLine( szLine ) <= 0 )
{
@@ -663,6 +665,7 @@ void Model::DrawPrimitives()
mat.Specular,
mat.fShininess );
DISPLAY->SetTexture( mat.aniTexture.GetCurrentTexture() );
DISPLAY->SetSphereEnironmentMapping( mat.bSphereMapped );
}
else
{
@@ -678,9 +681,11 @@ void Model::DrawPrimitives()
specular,
shininess );
DISPLAY->SetTexture( NULL );
DISPLAY->SetSphereEnironmentMapping( false );
}
DISPLAY->DrawIndexedTriangles( &TempVertices[0], pMesh->Vertices.size(), (Uint16*)&pMesh->Triangles[0], pMesh->Triangles.size()*3 );
DISPLAY->SetSphereEnironmentMapping( false );
}
}