mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Add option to set AnisotropyLevel , default 4
This commit is contained in:
parent
aaa0b93161
commit
66417155c9
3 changed files with 8 additions and 1 deletions
|
@ -67,6 +67,7 @@ void CConfig::Load(const char *iniFileName)
|
|||
graphics->Get("LinearFiltering", &bLinearFiltering, false);
|
||||
graphics->Get("SSAA", &SSAntiAliasing, 0);
|
||||
graphics->Get("VBO", &bUseVBO, false);
|
||||
graphics->Get("AnisotropyLevel", &iAnisotropyLevel, 4);
|
||||
graphics->Get("DisableG3DLog", &bDisableG3DLog, false);
|
||||
graphics->Get("VertexCache", &bVertexCache, true);
|
||||
graphics->Get("FullScreen", &bFullScreen, false);
|
||||
|
@ -123,6 +124,7 @@ void CConfig::Save()
|
|||
graphics->Set("LinearFiltering", bLinearFiltering);
|
||||
graphics->Set("SSAA", SSAntiAliasing);
|
||||
graphics->Set("VBO", bUseVBO);
|
||||
graphics->Set("AnisotropyLevel", iAnisotropyLevel);
|
||||
graphics->Set("DisableG3DLog", bDisableG3DLog);
|
||||
graphics->Set("VertexCache", bVertexCache);
|
||||
graphics->Set("FullScreen", bFullScreen);
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
bool bDisableG3DLog;
|
||||
bool bVertexCache;
|
||||
bool bFullScreen;
|
||||
int iAnisotropyLevel;
|
||||
|
||||
// Sound
|
||||
bool bEnableSound;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
// If a texture hasn't been seen for 200 frames, get rid of it.
|
||||
#define TEXTURE_KILL_AGE 200
|
||||
float maxAnisotropyLevel ;
|
||||
|
||||
TextureCache::TextureCache() {
|
||||
// TODO: Switch to aligned allocations for alignment. AllocateMemoryPages would do the trick.
|
||||
|
@ -35,6 +36,7 @@ TextureCache::TextureCache() {
|
|||
tmpTexBufRearrange = new u32[1024 * 512]; // 2MB
|
||||
clutBuf32 = new u32[4096]; // 4K
|
||||
clutBuf16 = new u16[4096]; // 4K
|
||||
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropyLevel);
|
||||
}
|
||||
|
||||
TextureCache::~TextureCache() {
|
||||
|
@ -857,7 +859,9 @@ void TextureCache::SetTexture() {
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, entry->maxLevel);
|
||||
#endif
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, (float)entry->maxLevel);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4.0);
|
||||
float anisotropyLevel = (float) g_Config.iAnisotropyLevel > maxAnisotropyLevel ? maxAnisotropyLevel : (float) g_Config.iAnisotropyLevel;
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropyLevel );
|
||||
// NOTICE_LOG(G3D,"AnisotropyLevel = %0.1f , MaxAnisotropyLevel = %0.1f ", anisotropyLevel, maxAnisotropyLevel );
|
||||
|
||||
UpdateSamplingParams(*entry, true);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue