2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #977 from yuriks/glenable-tex2d

GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
This commit is contained in:
bunnei 2015-07-23 10:07:35 -04:00
commit cea45af64d

View file

@ -147,20 +147,17 @@ void OpenGLState::Apply() {
// Textures
for (unsigned texture_index = 0; texture_index < ARRAY_SIZE(texture_units); ++texture_index) {
if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d) {
if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d ||
texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) {
glActiveTexture(GL_TEXTURE0 + texture_index);
if (texture_units[texture_index].enabled_2d) {
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d);
} else {
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, 0);
}
}
if (texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) {
glActiveTexture(GL_TEXTURE0 + texture_index);
glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d);
}
}
// Framebuffer