Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2016-09-21 18:41:34 +0300
committerMike Erwin <significant.bit@gmail.com>2016-09-21 18:41:59 +0300
commita3d258bfb49c4560bdb91fbedbfa8536641e2133 (patch)
treeded33a683ed847da31f1db305b397cfd7eb44407 /source/blender/gpu
parente8d953000afb462ee05140c9c4ec18bf60140687 (diff)
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.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index c0400cdb04c..f62ef677434 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -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);