summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-06-16 15:16:28 +0200
committerwwylele <wwylele@gmail.com>2017-06-21 22:13:06 +0200
commitbe9e952bdc33b6763618ee66046ce84c0ff18a34 (patch)
tree61c048fc5e0e8808b2d992cc2ee2bc627672a70e /src/video_core/renderer_opengl/gl_state.cpp
parentgl_rasterizer/lighting: fix LUT interpolation (diff)
downloadyuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.tar
yuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.tar.gz
yuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.tar.bz2
yuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.tar.lz
yuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.tar.xz
yuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.tar.zst
yuzu-be9e952bdc33b6763618ee66046ce84c0ff18a34.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 40d7cee96..6ef6d6c4c 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -183,7 +183,7 @@ void OpenGLState::Apply() const {
// Textures
for (unsigned i = 0; i < ARRAY_SIZE(texture_units); ++i) {
if (texture_units[i].texture_2d != cur_state.texture_units[i].texture_2d) {
- glActiveTexture(GL_TEXTURE0 + i);
+ glActiveTexture(TextureUnits::PicaTexture(i).Enum());
glBindTexture(GL_TEXTURE_2D, texture_units[i].texture_2d);
}
if (texture_units[i].sampler != cur_state.texture_units[i].sampler) {
@@ -193,43 +193,43 @@ void OpenGLState::Apply() const {
// Lighting LUTs
if (lighting_lut.texture_buffer != cur_state.lighting_lut.texture_buffer) {
- glActiveTexture(GL_TEXTURE15);
+ glActiveTexture(TextureUnits::LightingLUT.Enum());
glBindTexture(GL_TEXTURE_BUFFER, cur_state.lighting_lut.texture_buffer);
}
// Fog LUT
if (fog_lut.texture_1d != cur_state.fog_lut.texture_1d) {
- glActiveTexture(GL_TEXTURE9);
+ glActiveTexture(TextureUnits::FogLUT.Enum());
glBindTexture(GL_TEXTURE_1D, fog_lut.texture_1d);
}
// ProcTex Noise LUT
if (proctex_noise_lut.texture_1d != cur_state.proctex_noise_lut.texture_1d) {
- glActiveTexture(GL_TEXTURE10);
+ glActiveTexture(TextureUnits::ProcTexNoiseLUT.Enum());
glBindTexture(GL_TEXTURE_1D, proctex_noise_lut.texture_1d);
}
// ProcTex Color Map
if (proctex_color_map.texture_1d != cur_state.proctex_color_map.texture_1d) {
- glActiveTexture(GL_TEXTURE11);
+ glActiveTexture(TextureUnits::ProcTexColorMap.Enum());
glBindTexture(GL_TEXTURE_1D, proctex_color_map.texture_1d);
}
// ProcTex Alpha Map
if (proctex_alpha_map.texture_1d != cur_state.proctex_alpha_map.texture_1d) {
- glActiveTexture(GL_TEXTURE12);
+ glActiveTexture(TextureUnits::ProcTexAlphaMap.Enum());
glBindTexture(GL_TEXTURE_1D, proctex_alpha_map.texture_1d);
}
// ProcTex LUT
if (proctex_lut.texture_1d != cur_state.proctex_lut.texture_1d) {
- glActiveTexture(GL_TEXTURE13);
+ glActiveTexture(TextureUnits::ProcTexLUT.Enum());
glBindTexture(GL_TEXTURE_1D, proctex_lut.texture_1d);
}
// ProcTex Diff LUT
if (proctex_diff_lut.texture_1d != cur_state.proctex_diff_lut.texture_1d) {
- glActiveTexture(GL_TEXTURE14);
+ glActiveTexture(TextureUnits::ProcTexDiffLUT.Enum());
glBindTexture(GL_TEXTURE_1D, proctex_diff_lut.texture_1d);
}