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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user