[Bf-blender-cvs] [31a99a3ab45] master: Fix T65763: Reset GPU when exporting annotations

Jeroen Bakker noreply at git.blender.org
Fri Jun 14 10:52:44 CEST 2019


Commit: 31a99a3ab45a72476df781288f1c81763df57c62
Author: Jeroen Bakker
Date:   Fri Jun 14 10:49:05 2019 +0200
Branches: master
https://developer.blender.org/rB31a99a3ab45a72476df781288f1c81763df57c62

Fix T65763: Reset GPU when exporting annotations

When exporting annotations using `bpy.ops.render.opengl` the annotations
where only correct in the first frame. In the second frame the
annotations was shifted by half the resolution.

This change will reset the GPU matrices when the annotations are
rendered.

===================================================================

M	source/blender/editors/render/render_opengl.c

===================================================================

diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 110dc7aaaf1..72e6c6fdf03 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -331,6 +331,7 @@ static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, R
       GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f);
       GPU_clear(GPU_COLOR_BIT | GPU_DEPTH_BIT);
 
+      GPU_matrix_reset();
       wmOrtho2(0, scene->r.xsch, 0, scene->r.ysch);
       GPU_matrix_translate_2f(scene->r.xsch / 2, scene->r.ysch / 2);



More information about the Bf-blender-cvs mailing list