mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Enable texture_filter_anisotropic for GLES.
This commit is contained in:
parent
c9f62a55e8
commit
37b5a38486
|
@ -1182,12 +1182,10 @@ void OGLRender::_initExtensions()
|
|||
#endif
|
||||
LOG(LOG_VERBOSE, "ImageTexture support: %s\n", m_bImageTexture ? "yes" : "no");
|
||||
|
||||
#ifndef GLESX
|
||||
if (config.texture.maxAnisotropy != 0) {
|
||||
if (config.texture.maxAnisotropy != 0 && strstr((const char *)glGetString(GL_EXTENSIONS), "GL_EXT_texture_filter_anisotropic") != NULL) {
|
||||
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &config.texture.maxAnisotropyF);
|
||||
config.texture.maxAnisotropyF = min(config.texture.maxAnisotropyF, (f32)config.texture.maxAnisotropy);
|
||||
} else
|
||||
#endif
|
||||
config.texture.maxAnisotropyF = 0.0f;
|
||||
LOG(LOG_VERBOSE, "Max Anisotropy: %f\n", config.texture.maxAnisotropyF);
|
||||
}
|
||||
|
|
|
@ -51,6 +51,10 @@ typedef char GLchar;
|
|||
#include <SDL.h>
|
||||
#endif // USE_SDL
|
||||
#endif // OS_WINDOWS
|
||||
#ifndef GL_EXT_texture_filter_anisotropic
|
||||
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
|
||||
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
|
||||
#endif
|
||||
|
||||
#include "glState.h"
|
||||
#include "gSP.h"
|
||||
|
|
|
@ -1158,10 +1158,8 @@ void TextureCache::activateTexture(u32 _t, CachedTexture *_pTexture)
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, _pTexture->clampS ? GL_CLAMP_TO_EDGE : _pTexture->mirrorS ? GL_MIRRORED_REPEAT : GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, _pTexture->clampT ? GL_CLAMP_TO_EDGE : _pTexture->mirrorT ? GL_MIRRORED_REPEAT : GL_REPEAT);
|
||||
|
||||
#ifndef GLESX
|
||||
if (video().getRender().getRenderState() == OGLRender::rsTriangle && config.texture.maxAnisotropyF > 0.0f)
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, config.texture.maxAnisotropyF);
|
||||
#endif
|
||||
|
||||
_pTexture->lastDList = RSP.DList;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user