Skip to content
Permalink
Browse files

Fixed bug 3569 - GL_UpdateViewport leaves PROJECTION matrix selected

Tom Seddon

GL_ActivateRenderer may call GL_UpdateViewport, which leaves the GL_PROJECTION matrix selected. But after GL_ResetState, the GL_MODELVIEW matrix is selected, suggesting that's the intended default state.

It seems at least like these should be consistent. Presumably GL_UpdateViewport should be doing a glMatrixMode(GL_MODELVIEW) before it finishes.
  • Loading branch information
slouken committed Jan 28, 2017
1 parent 0090a33 commit 13433c4a61356381aa2ee0f08858753e87d85dd1
Showing with 4 additions and 0 deletions.
  1. +2 −0 src/render/opengl/SDL_render_gl.c
  2. +2 −0 src/render/opengles/SDL_render_gles.c
@@ -1041,6 +1041,8 @@ GL_UpdateViewport(SDL_Renderer * renderer)
0.0, 1.0);
}
}
data->glMatrixMode(GL_MODELVIEW);

return GL_CheckError("", renderer);
}

@@ -692,6 +692,8 @@ GLES_UpdateViewport(SDL_Renderer * renderer)
0.0, 1.0);
}
}
data->glMatrixMode(GL_MODELVIEW);

return 0;
}

0 comments on commit 13433c4

Please sign in to comment.