add TextureUnit param to SetTextureFiltering
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 ) { }
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -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 ¶m, int &iTextureWidthOut, int &iTextureHeightOut );
|
||||
void SetRenderTarget( unsigned iHandle, bool bPreserveTexture );
|
||||
|
||||
Reference in New Issue
Block a user