add TextureUnit param to SetTextureFiltering

This commit is contained in:
Glenn Maynard
2007-02-13 05:09:54 +00:00
parent 4acd7f3971
commit 863062f7d1
8 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -368,7 +368,7 @@ void Model::DrawPrimitives()
Actor::SetTextureRenderStates(); // set Actor-specified render states
DISPLAY->SetSphereEnvironmentMapping( mat.alpha.m_bSphereMapped );
DISPLAY->SetTextureMode( TextureUnit_2, TextureMode_Add );
DISPLAY->SetTextureFiltering( true );
DISPLAY->SetTextureFiltering( TextureUnit_2, true );
}
else
{
@@ -403,7 +403,7 @@ void Model::DrawPrimitives()
DISPLAY->SetSphereEnvironmentMapping( mat.alpha.m_bSphereMapped );
// UGLY: This overrides the Actor's BlendMode
DISPLAY->SetBlendMode( BLEND_ADD );
DISPLAY->SetTextureFiltering( true );
DISPLAY->SetTextureFiltering( TextureUnit_1, true );
DrawMesh( i );
}
}
+1 -1
View File
@@ -247,7 +247,7 @@ void RageDisplay::SetDefaultRenderStates()
SetZTestMode( ZTEST_OFF );
SetAlphaTest( true );
SetBlendMode( BLEND_NORMAL );
SetTextureFiltering( true );
SetTextureFiltering( TextureUnit_1, true );
SetZBias( 0 );
LoadMenuPerspective( 0, 640, 480, 320, 240 ); // 0 FOV = ortho
}
+1 -1
View File
@@ -206,7 +206,7 @@ public:
virtual void SetTextureMode( TextureUnit tu, TextureMode tm ) = 0;
virtual void SetTextureWrapping( bool b ) = 0;
virtual int GetMaxTextureSize() const = 0;
virtual void SetTextureFiltering( bool b ) = 0;
virtual void SetTextureFiltering( TextureUnit tu, bool b ) = 0;
bool SupportsRenderToTexture() const { return false; }
+4 -4
View File
@@ -1193,13 +1193,13 @@ void RageDisplay_D3D::SetTextureMode( TextureUnit tu, TextureMode tm )
}
}
void RageDisplay_D3D::SetTextureFiltering( bool b )
void RageDisplay_D3D::SetTextureFiltering( TextureUnit tu, bool b )
{
if( g_currentTextureUnit >= (int) g_DeviceCaps.MaxSimultaneousTextures ) // not supported
if( tu >= (int) g_DeviceCaps.MaxSimultaneousTextures ) // not supported
return;
g_pd3dDevice->SetTextureStageState( g_currentTextureUnit, D3DTSS_MINFILTER, b ? D3DTEXF_LINEAR : D3DTEXF_POINT );
g_pd3dDevice->SetTextureStageState( g_currentTextureUnit, D3DTSS_MAGFILTER, b ? D3DTEXF_LINEAR : D3DTEXF_POINT );
g_pd3dDevice->SetTextureStageState( tu, D3DTSS_MINFILTER, b ? D3DTEXF_LINEAR : D3DTEXF_POINT );
g_pd3dDevice->SetTextureStageState( tu, D3DTSS_MAGFILTER, b ? D3DTEXF_LINEAR : D3DTEXF_POINT );
}
void RageDisplay_D3D::SetBlendMode( BlendMode mode )
+1 -1
View File
@@ -39,7 +39,7 @@ public:
void SetTextureMode( TextureUnit tu, TextureMode tm );
void SetTextureWrapping( bool b );
int GetMaxTextureSize() const;
void SetTextureFiltering( bool b);
void SetTextureFiltering( TextureUnit tu, bool b );
bool IsZWriteEnabled() const;
bool IsZTestEnabled() const;
void SetZWrite( bool b );
+1 -1
View File
@@ -36,7 +36,7 @@ public:
void SetTextureMode( TextureUnit tu, TextureMode tm ) { }
void SetTextureWrapping( bool b ) { }
int GetMaxTextureSize() const { return 2048; }
void SetTextureFiltering( bool b) { }
void SetTextureFiltering( TextureUnit tu, bool b ) { }
bool IsZWriteEnabled() const { return false; }
bool IsZTestEnabled() const { return false; }
void SetZWrite( bool b ) { }
+1 -1
View File
@@ -1442,7 +1442,7 @@ void RageDisplay_OGL::SetTextureMode( TextureUnit tu, TextureMode tm )
}
}
void RageDisplay_OGL::SetTextureFiltering( bool b )
void RageDisplay_OGL::SetTextureFiltering( TextureUnit tu, bool b )
{
}
+1 -1
View File
@@ -46,7 +46,7 @@ public:
void SetTextureMode( TextureUnit tu, TextureMode tm );
void SetTextureWrapping( bool b );
int GetMaxTextureSize() const;
void SetTextureFiltering( bool b);
void SetTextureFiltering( TextureUnit tu, bool b );
bool SupportsRenderToTexture() const;
unsigned CreateRenderTarget( const RenderTargetParam &param, int &iTextureWidthOut, int &iTextureHeightOut );
void SetRenderTarget( unsigned iHandle, bool bPreserveTexture );