for real this time :)

This commit is contained in:
Glenn Maynard
2005-01-22 03:39:39 +00:00
parent 754bce5c98
commit 1d3613f161
7 changed files with 13 additions and 13 deletions
+7 -7
View File
@@ -352,14 +352,14 @@ void Model::DrawPrimitives()
{ {
// render the diffuse texture // render the diffuse texture
DISPLAY->SetTexture( 0, mat.diffuse.GetCurrentTexture() ); DISPLAY->SetTexture( 0, mat.diffuse.GetCurrentTexture() );
DISPLAY->SetSphereEnivronmentMapping( mat.diffuse.m_bSphereMapped ); DISPLAY->SetSphereEnvironmentMapping( mat.diffuse.m_bSphereMapped );
DrawMesh( i ); DrawMesh( i );
// render the additive texture // render the additive texture
if( mat.alpha.GetCurrentTexture() ) if( mat.alpha.GetCurrentTexture() )
{ {
DISPLAY->SetTexture( 0, mat.alpha.GetCurrentTexture() ); DISPLAY->SetTexture( 0, mat.alpha.GetCurrentTexture() );
DISPLAY->SetSphereEnivronmentMapping( mat.alpha.m_bSphereMapped ); DISPLAY->SetSphereEnvironmentMapping( mat.alpha.m_bSphereMapped );
// UGLY: This overrides the Actor's BlendMode // UGLY: This overrides the Actor's BlendMode
DISPLAY->SetBlendMode( BLEND_ADD ); DISPLAY->SetBlendMode( BLEND_ADD );
DISPLAY->SetTextureFiltering( true ); DISPLAY->SetTextureFiltering( true );
@@ -370,13 +370,13 @@ void Model::DrawPrimitives()
{ {
// render the diffuse texture with texture unit 1 // render the diffuse texture with texture unit 1
DISPLAY->SetTexture( 0, mat.diffuse.GetCurrentTexture() ); DISPLAY->SetTexture( 0, mat.diffuse.GetCurrentTexture() );
DISPLAY->SetSphereEnivronmentMapping( mat.diffuse.m_bSphereMapped ); DISPLAY->SetSphereEnvironmentMapping( mat.diffuse.m_bSphereMapped );
// render the additive texture with texture unit 2 // render the additive texture with texture unit 2
if( mat.alpha.GetCurrentTexture() ) if( mat.alpha.GetCurrentTexture() )
{ {
DISPLAY->SetTexture( 1, mat.alpha.GetCurrentTexture() ); DISPLAY->SetTexture( 1, mat.alpha.GetCurrentTexture() );
DISPLAY->SetSphereEnivronmentMapping( mat.alpha.m_bSphereMapped ); DISPLAY->SetSphereEnvironmentMapping( mat.alpha.m_bSphereMapped );
DISPLAY->SetTextureModeAdd(); DISPLAY->SetTextureModeAdd();
DISPLAY->SetTextureFiltering( true ); DISPLAY->SetTextureFiltering( true );
} }
@@ -386,7 +386,7 @@ void Model::DrawPrimitives()
// Turn off Environment mapping on tex unit 0. Is there a better way to reset? // Turn off Environment mapping on tex unit 0. Is there a better way to reset?
DISPLAY->SetTexture( 0, NULL ); DISPLAY->SetTexture( 0, NULL );
DISPLAY->SetSphereEnivronmentMapping( 0 ); DISPLAY->SetSphereEnvironmentMapping( 0 );
} }
} }
else else
@@ -398,11 +398,11 @@ void Model::DrawPrimitives()
static const float shininess = 1; static const float shininess = 1;
DISPLAY->SetMaterial( emissive, ambient, diffuse, specular, shininess ); DISPLAY->SetMaterial( emissive, ambient, diffuse, specular, shininess );
DISPLAY->ClearAllTextures(); DISPLAY->ClearAllTextures();
DISPLAY->SetSphereEnivronmentMapping( false ); DISPLAY->SetSphereEnvironmentMapping( false );
DrawMesh( i ); DrawMesh( i );
} }
DISPLAY->SetSphereEnivronmentMapping( false ); DISPLAY->SetSphereEnvironmentMapping( false );
DISPLAY->SetBlendMode( BLEND_NORMAL ); DISPLAY->SetBlendMode( BLEND_NORMAL );
DISPLAY->TexturePopMatrix(); DISPLAY->TexturePopMatrix();
} }
+1 -1
View File
@@ -226,7 +226,7 @@ public:
const RageColor &specular, const RageColor &specular,
const RageVector3 &dir ) = 0; const RageVector3 &dir ) = 0;
virtual void SetSphereEnivronmentMapping( bool b ) = 0; virtual void SetSphereEnvironmentMapping( bool b ) = 0;
virtual RageCompiledGeometry* CreateCompiledGeometry() = 0; virtual RageCompiledGeometry* CreateCompiledGeometry() = 0;
virtual void DeleteCompiledGeometry( RageCompiledGeometry* p ) = 0; virtual void DeleteCompiledGeometry( RageCompiledGeometry* p ) = 0;
+1 -1
View File
@@ -1329,7 +1329,7 @@ RageMatrix RageDisplay_D3D::GetOrthoMatrix( float l, float r, float b, float t,
return m; return m;
} }
void RageDisplay_D3D::SetSphereEnivronmentMapping( bool b ) void RageDisplay_D3D::SetSphereEnvironmentMapping( bool b )
{ {
if( g_iCurrentTextureIndex >= (int) g_DeviceCaps.MaxSimultaneousTextures ) // not supported if( g_iCurrentTextureIndex >= (int) g_DeviceCaps.MaxSimultaneousTextures ) // not supported
return; return;
+1 -1
View File
@@ -61,7 +61,7 @@ public:
const RageColor &specular, const RageColor &specular,
const RageVector3 &dir ); const RageVector3 &dir );
void SetSphereEnivronmentMapping( bool b ); void SetSphereEnvironmentMapping( bool b );
RageCompiledGeometry* CreateCompiledGeometry(); RageCompiledGeometry* CreateCompiledGeometry();
void DeleteCompiledGeometry( RageCompiledGeometry* p ); void DeleteCompiledGeometry( RageCompiledGeometry* p );
+1 -1
View File
@@ -59,7 +59,7 @@ public:
const RageColor &specular, const RageColor &specular,
const RageVector3 &dir ) { } const RageVector3 &dir ) { }
void SetSphereEnivronmentMapping( bool b ) { } void SetSphereEnvironmentMapping( bool b ) { }
RageCompiledGeometry* CreateCompiledGeometry(); RageCompiledGeometry* CreateCompiledGeometry();
void DeleteCompiledGeometry( RageCompiledGeometry* p ); void DeleteCompiledGeometry( RageCompiledGeometry* p );
+1 -1
View File
@@ -1877,7 +1877,7 @@ bool RageDisplay_OGL::SupportsTextureFormat( PixelFormat pixfmt, bool realtime )
} }
} }
void RageDisplay_OGL::SetSphereEnivronmentMapping( bool b ) void RageDisplay_OGL::SetSphereEnvironmentMapping( bool b )
{ {
if( b ) if( b )
{ {
+1 -1
View File
@@ -62,7 +62,7 @@ public:
const RageColor &specular, const RageColor &specular,
const RageVector3 &dir ); const RageVector3 &dir );
void SetSphereEnivronmentMapping( bool b ); void SetSphereEnvironmentMapping( bool b );
RageCompiledGeometry* CreateCompiledGeometry(); RageCompiledGeometry* CreateCompiledGeometry();
void DeleteCompiledGeometry( RageCompiledGeometry* p ); void DeleteCompiledGeometry( RageCompiledGeometry* p );