diff options
| author | wwylele <wwylele@gmail.com> | 2017-06-16 16:16:28 +0300 |
|---|---|---|
| committer | wwylele <wwylele@gmail.com> | 2017-06-21 23:13:06 +0300 |
| commit | be9e952bdc33b6763618ee66046ce84c0ff18a34 (patch) | |
| tree | 61c048fc5e0e8808b2d992cc2ee2bc627672a70e /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | ab60414122184851415a27ae8bcacb4aab0504b6 (diff) | |
gl_rasterizer: manage texture ids in one place
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 16 |
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); } |
