diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2013-12-30 07:22:50 -0600 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2014-01-17 15:50:51 +0100 |
| commit | 71681de81a79c6508f44dfc949026ec2f51943ae (patch) | |
| tree | d5f83f2100fbcd5891a36dbed97c4469be301b13 /Source/Core/VideoBackends/OGL/SamplerCache.cpp | |
| parent | 770485ad04185c93ea18b8bf86e56569d1fb8f37 (diff) | |
[GLExtensions] Initial code drop for GLExtensions. This drops GLEW entirely from the codebase. This has been tested on Android and Linux+ATI. Of course untested on Windows and Apple. Also untested with Linux + EGL but should be fine there. There are most likely a couple of extensions I'm missing which would result in null pointer runs but not bad for the initial commit.
Conflicts:
CMakeLists.txt
Externals/GLew/glew.vcxproj
Externals/GLew/glew.vcxproj.filters
Source/Core/VideoBackends/OGL/CMakeLists.txt
Source/Core/VideoBackends/OGL/GLFunctions.cpp
Source/Core/VideoBackends/OGL/GLFunctions.h
Source/Core/VideoBackends/OGL/GLUtil.h
Source/Core/VideoBackends/OGL/Render.cpp
Source/VSProps/Base.props
Diffstat (limited to 'Source/Core/VideoBackends/OGL/SamplerCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/SamplerCache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/OGL/SamplerCache.cpp b/Source/Core/VideoBackends/OGL/SamplerCache.cpp index 2b50652ade..01f5959c57 100644 --- a/Source/Core/VideoBackends/OGL/SamplerCache.cpp +++ b/Source/Core/VideoBackends/OGL/SamplerCache.cpp @@ -99,12 +99,13 @@ void SamplerCache::SetParameters(GLuint sampler_id, const Params& params) glSamplerParameterf(sampler_id, GL_TEXTURE_MIN_LOD, tm1.min_lod / 16.f); glSamplerParameterf(sampler_id, GL_TEXTURE_MAX_LOD, tm1.max_lod / 16.f); -#ifndef USE_GLES3 - glSamplerParameterf(sampler_id, GL_TEXTURE_LOD_BIAS, (s32)tm0.lod_bias / 32.f); + if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL) + { + glSamplerParameterf(sampler_id, GL_TEXTURE_LOD_BIAS, (s32)tm0.lod_bias / 32.f); - if (g_ActiveConfig.iMaxAnisotropy > 0) - glSamplerParameterf(sampler_id, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)(1 << g_ActiveConfig.iMaxAnisotropy)); -#endif + if (g_ActiveConfig.iMaxAnisotropy > 0) + glSamplerParameterf(sampler_id, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)(1 << g_ActiveConfig.iMaxAnisotropy)); + } } void SamplerCache::Clear() |
