summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-06-16 13:00:15 +0200
committerwwylele <wwylele@gmail.com>2017-06-21 22:13:06 +0200
commitab60414122184851415a27ae8bcacb4aab0504b6 (patch)
treef26b042d908ede118686e781eedfec24539ab299 /src/video_core/renderer_opengl/gl_state.cpp
parentMerge pull request #2776 from wwylele/geo-factor (diff)
downloadyuzu-ab60414122184851415a27ae8bcacb4aab0504b6.tar
yuzu-ab60414122184851415a27ae8bcacb4aab0504b6.tar.gz
yuzu-ab60414122184851415a27ae8bcacb4aab0504b6.tar.bz2
yuzu-ab60414122184851415a27ae8bcacb4aab0504b6.tar.lz
yuzu-ab60414122184851415a27ae8bcacb4aab0504b6.tar.xz
yuzu-ab60414122184851415a27ae8bcacb4aab0504b6.tar.zst
yuzu-ab60414122184851415a27ae8bcacb4aab0504b6.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index bf837a7fb..40d7cee96 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -52,9 +52,7 @@ OpenGLState::OpenGLState() {
texture_unit.sampler = 0;
}
- for (auto& lut : lighting_luts) {
- lut.texture_1d = 0;
- }
+ lighting_lut.texture_buffer = 0;
fog_lut.texture_1d = 0;
@@ -194,11 +192,9 @@ void OpenGLState::Apply() const {
}
// Lighting LUTs
- for (unsigned i = 0; i < ARRAY_SIZE(lighting_luts); ++i) {
- if (lighting_luts[i].texture_1d != cur_state.lighting_luts[i].texture_1d) {
- glActiveTexture(GL_TEXTURE3 + i);
- glBindTexture(GL_TEXTURE_1D, lighting_luts[i].texture_1d);
- }
+ if (lighting_lut.texture_buffer != cur_state.lighting_lut.texture_buffer) {
+ glActiveTexture(GL_TEXTURE15);
+ glBindTexture(GL_TEXTURE_BUFFER, cur_state.lighting_lut.texture_buffer);
}
// Fog LUT