[Bf-blender-cvs] [d9228c557b0] master: Cleanup: KnifeTool: Replace glPolygonOffset by GPU_polygon_offset

Clément Foucault noreply at git.blender.org
Sat Jul 18 03:08:18 CEST 2020


Commit: d9228c557b06b267eb145c12735ac463e0a5afde
Author: Clément Foucault
Date:   Sat Jul 18 03:46:12 2020 +0200
Branches: master
https://developer.blender.org/rBd9228c557b06b267eb145c12735ac463e0a5afde

Cleanup: KnifeTool: Replace glPolygonOffset by GPU_polygon_offset

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

M	source/blender/editors/mesh/editmesh_knife.c

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

diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 0394874e8c1..873bdf2a674 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1053,7 +1053,8 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v
   const KnifeTool_OpData *kcd = arg;
   GPU_depth_test(false);
 
-  glPolygonOffset(1.0f, 1.0f);
+  GPU_matrix_push_projection();
+  GPU_polygon_offset(1.0f, 1.0f);
 
   GPU_matrix_push();
   GPU_matrix_mul(kcd->ob->obmat);
@@ -1224,6 +1225,7 @@ static void knifetool_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), v
   immUnbindProgram();
 
   GPU_matrix_pop();
+  GPU_matrix_pop_projection();
 
   /* Reset default */
   GPU_depth_test(true);



More information about the Bf-blender-cvs mailing list