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.
This commit is contained in:
Jeroen Bakker 2019-06-14 10:49:05 +02:00
parent 3bfd81ce29
commit 31a99a3ab4
Notes: blender-bot 2023-02-14 02:13:06 +01:00
Referenced by issue #65763, Sequencer OpenGL Render : Annotations not rendered with python command but is rendered using UI button
1 changed files with 1 additions and 0 deletions

View File

@ -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);