[Bf-blender-cvs] [0c668852765] master: View3D Snap Cursor: Fix drawing state incorrectly reset
Germano Cavalcante
noreply at git.blender.org
Thu Oct 21 21:38:00 CEST 2021
Commit: 0c668852765ddac0ebe2d34f347095baac7eacc4
Author: Germano Cavalcante
Date: Thu Oct 21 16:37:41 2021 -0300
Branches: master
https://developer.blender.org/rB0c668852765ddac0ebe2d34f347095baac7eacc4
View3D Snap Cursor: Fix drawing state incorrectly reset
The viewport was being changed, so it needs to be reset.
===================================================================
M source/blender/editors/space_view3d/view3d_cursor_snap.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c
index ff5c5c6a946..1cb650910ce 100644
--- a/source/blender/editors/space_view3d/view3d_cursor_snap.c
+++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c
@@ -799,8 +799,6 @@ static void v3d_cursor_snap_draw_fn(bContext *C, int x, int y, void *UNUSED(cust
/* Setup viewport & matrix. */
RegionView3D *rv3d = region->regiondata;
wmViewport(®ion->winrct);
- GPU_matrix_push_projection();
- GPU_matrix_push();
GPU_matrix_projection_set(rv3d->winmat);
GPU_matrix_set(rv3d->viewmat);
@@ -834,8 +832,7 @@ static void v3d_cursor_snap_draw_fn(bContext *C, int x, int y, void *UNUSED(cust
GPU_blend(GPU_BLEND_NONE);
/* Restore matrix. */
- GPU_matrix_pop();
- GPU_matrix_pop_projection();
+ wmWindowViewport(CTX_wm_window(C));
}
/** \} */
More information about the Bf-blender-cvs
mailing list