[Bf-blender-cvs] [5049322e625] blender2.8: GPUState: Change isolated glLineWidth usage to GPU_line_width

Clément Foucault noreply at git.blender.org
Tue Dec 11 23:05:47 CET 2018


Commit: 5049322e6252617ab9477338bf2f5d3e4d7845d6
Author: Clément Foucault
Date:   Tue Dec 11 23:05:36 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB5049322e6252617ab9477338bf2f5d3e4d7845d6

GPUState: Change isolated glLineWidth usage to GPU_line_width

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

M	source/blender/draw/intern/draw_view.c
M	source/blender/editors/gpencil/gpencil_fill.c
M	source/blender/windowmanager/intern/wm_gesture.c

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

diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index f56cbd68077..4a890c3be84 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -182,7 +182,7 @@ void DRW_draw_cursor(void)
 			RegionView3D *rv3d = ar->regiondata;
 
 			/* Draw nice Anti Aliased cursor. */
-			glLineWidth(1.0f);
+			GPU_line_width(1.0f);
 			glEnable(GL_BLEND);
 			glEnable(GL_LINE_SMOOTH);
 
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 6105a6b2523..68f463dbce0 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -70,6 +70,7 @@
 #include "GPU_draw.h"
 #include "GPU_matrix.h"
 #include "GPU_framebuffer.h"
+#include "GPU_state.h"
 
 #include "UI_interface.h"
 
@@ -151,7 +152,7 @@ static void gp_draw_basic_stroke(
 	immBindBuiltinProgram(GPU_SHADER_3D_FLAT_COLOR);
 
 	/* draw stroke curve */
-	glLineWidth(1.0f);
+	GPU_line_width(1.0f);
 	immBeginAtMost(GPU_PRIM_LINE_STRIP, totpoints + cyclic_add);
 	const bGPDspoint *pt = points;
 
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 70150e40142..77734a361c1 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -53,6 +53,7 @@
 
 #include "GPU_immediate.h"
 #include "GPU_immediate_util.h"
+#include "GPU_state.h"
 
 #include "BIF_glutil.h"
 
@@ -418,7 +419,7 @@ void wm_gesture_draw(wmWindow *win)
 {
 	wmGesture *gt = (wmGesture *)win->gesture.first;
 
-	glLineWidth(1.0f);
+	GPU_line_width(1.0f);
 	for (; gt; gt = gt->next) {
 		/* all in subwindow space */
 		wmViewport(&gt->winrct);



More information about the Bf-blender-cvs mailing list