fix for potential pitfall with glMatrixMode

close D696 by @jwilkins

The matrix mode should always be left in modelview mode, since a lot of code assumes it is before setting a matrix.
This commit is contained in:
Mike Erwin 2016-09-21 17:41:34 +02:00
parent e8d953000a
commit a3d258bfb4
1 changed files with 3 additions and 3 deletions

View File

@ -401,13 +401,13 @@ void GPU_framebuffer_blur(
GPU_shader_uniform_texture(blur_shader, texture_source_uniform, tex);
glViewport(0, 0, GPU_texture_width(blurtex), GPU_texture_height(blurtex));
/* Peparing to draw quad */
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/* Preparing to draw quad */
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glDisable(GL_DEPTH_TEST);