add pref: TrilinearFiltering
This commit is contained in:
@@ -227,6 +227,7 @@ void PrefsManager::Init()
|
||||
m_iMaxHighScoresPerList = 10;
|
||||
m_fPadStickSeconds = 0;
|
||||
m_bForceMipMaps = false;
|
||||
m_bTrilinearFiltering = false;
|
||||
m_bAnisotropicFiltering = false;
|
||||
g_bAutoRestart = false;
|
||||
m_bSignProfileData = false;
|
||||
@@ -523,6 +524,7 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
||||
ini.GetValue( "Options", "MaxHighScoresPerList", m_iMaxHighScoresPerList );
|
||||
ini.GetValue( "Options", "PadStickSeconds", m_fPadStickSeconds );
|
||||
ini.GetValue( "Options", "ForceMipMaps", m_bForceMipMaps );
|
||||
ini.GetValue( "Options", "TrilinearFiltering", m_bTrilinearFiltering );
|
||||
ini.GetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering );
|
||||
ini.GetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||
ini.GetValue( "Options", "SignProfileData", m_bSignProfileData );
|
||||
@@ -745,6 +747,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
ini.SetValue( "Options", "MaxHighScoresPerList", m_iMaxHighScoresPerList );
|
||||
ini.SetValue( "Options", "PadStickSeconds", m_fPadStickSeconds );
|
||||
ini.SetValue( "Options", "ForceMipMaps", m_bForceMipMaps );
|
||||
ini.SetValue( "Options", "TrilinearFiltering", m_bTrilinearFiltering );
|
||||
ini.SetValue( "Options", "AnisotropicFiltering", m_bAnisotropicFiltering );
|
||||
ini.SetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||
ini.SetValue( "Options", "SignProfileData", m_bSignProfileData );
|
||||
|
||||
@@ -204,7 +204,8 @@ public:
|
||||
// Useful for non 4:3 displays and resolutions < 640x480 where texels don't
|
||||
// map directly to pixels.
|
||||
bool m_bForceMipMaps;
|
||||
bool m_bAnisotropicFiltering; // has no effect without mipmaps on
|
||||
bool m_bTrilinearFiltering; // has no effect without mipmaps on
|
||||
bool m_bAnisotropicFiltering; // has no effect without mipmaps on. Not mutually exclusive with trilinear.
|
||||
|
||||
// If true, then signatures created when writing profile data
|
||||
// and verified when reading profile data. Leave this false if
|
||||
|
||||
@@ -108,6 +108,7 @@ public:
|
||||
bool vsync_,
|
||||
bool interlaced_,
|
||||
bool bSmoothLines_,
|
||||
bool bTrilinearFiltering_,
|
||||
bool bAnisotropicFiltering_,
|
||||
CString sWindowTitle_,
|
||||
CString sIconFile_
|
||||
@@ -124,6 +125,7 @@ public:
|
||||
vsync = vsync_;
|
||||
interlaced = interlaced_;
|
||||
bSmoothLines = bSmoothLines_;
|
||||
bTrilinearFiltering = bTrilinearFiltering_;
|
||||
bAnisotropicFiltering = bAnisotropicFiltering_;
|
||||
sWindowTitle = sWindowTitle_;
|
||||
sIconFile = sIconFile_;
|
||||
@@ -140,6 +142,7 @@ public:
|
||||
int rate;
|
||||
bool vsync;
|
||||
bool bSmoothLines;
|
||||
bool bTrilinearFiltering;
|
||||
bool bAnisotropicFiltering;
|
||||
bool interlaced;
|
||||
#ifdef _XBOX
|
||||
|
||||
@@ -1677,7 +1677,19 @@ unsigned RageDisplay_OGL::CreateTexture(
|
||||
|
||||
glBindTexture( GL_TEXTURE_2D, uTexHandle );
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, bGenerateMipMaps ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR);
|
||||
GLint minFilter;
|
||||
if( bGenerateMipMaps )
|
||||
{
|
||||
if( wind->GetVideoModeParams().bTrilinearFiltering )
|
||||
minFilter = GL_LINEAR_MIPMAP_LINEAR;
|
||||
else
|
||||
minFilter = GL_LINEAR_MIPMAP_NEAREST;
|
||||
}
|
||||
else
|
||||
{
|
||||
minFilter = GL_LINEAR;
|
||||
}
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minFilter);
|
||||
|
||||
if( wind->GetVideoModeParams().bAnisotropicFiltering &&
|
||||
HasExtension("GL_EXT_texture_filter_anisotropic") )
|
||||
|
||||
@@ -115,6 +115,7 @@ static RageDisplay::VideoModeParams GetCurVideoModeParams()
|
||||
PREFSMAN->m_bVsync,
|
||||
PREFSMAN->m_bInterlaced,
|
||||
PREFSMAN->m_bSmoothLines,
|
||||
PREFSMAN->m_bTrilinearFiltering,
|
||||
PREFSMAN->m_bAnisotropicFiltering,
|
||||
THEME->GetMetric("Common","WindowTitle"),
|
||||
THEME->GetPathToG("Common window icon")
|
||||
|
||||
Reference in New Issue
Block a user