diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-01 05:54:31 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-09-08 08:53:37 +0200 |
commit | b56e5edafcc18901c08634b1730f1e1870a14891 (patch) | |
tree | b91531252b3743a2d62df9cf7b86a3e89a011ad7 /src/video_core/renderer_opengl/gl_state.cpp | |
parent | Merge pull request #1257 from lioncash/process (diff) | |
download | yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.gz yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.bz2 yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.lz yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.xz yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.zst yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 60a4defd1..6f70deb96 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -200,9 +200,9 @@ void OpenGLState::Apply() const { const auto& texture_unit = texture_units[i]; const auto& cur_state_texture_unit = cur_state.texture_units[i]; - if (texture_unit.texture_2d != cur_state_texture_unit.texture_2d) { + if (texture_unit.texture != cur_state_texture_unit.texture) { glActiveTexture(TextureUnits::MaxwellTexture(static_cast<int>(i)).Enum()); - glBindTexture(GL_TEXTURE_2D, texture_unit.texture_2d); + glBindTexture(texture_unit.target, texture_unit.texture); } if (texture_unit.sampler != cur_state_texture_unit.sampler) { glBindSampler(static_cast<GLuint>(i), texture_unit.sampler); @@ -214,7 +214,7 @@ void OpenGLState::Apply() const { texture_unit.swizzle.a != cur_state_texture_unit.swizzle.a) { std::array<GLint, 4> mask = {texture_unit.swizzle.r, texture_unit.swizzle.g, texture_unit.swizzle.b, texture_unit.swizzle.a}; - glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, mask.data()); + glTexParameteriv(texture_unit.target, GL_TEXTURE_SWIZZLE_RGBA, mask.data()); } } @@ -287,7 +287,7 @@ void OpenGLState::Apply() const { OpenGLState& OpenGLState::UnbindTexture(GLuint handle) { for (auto& unit : texture_units) { - if (unit.texture_2d == handle) { + if (unit.texture == handle) { unit.Unbind(); } } |