GPUState: Change isolated glLineWidth usage to GPU_line_width
authorClément Foucault <foucault.clem@gmail.com>
Tue, 11 Dec 2018 22:05:36 +0000 (23:05 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 11 Dec 2018 22:05:36 +0000 (23:05 +0100)
source/blender/draw/intern/draw_view.c
source/blender/editors/gpencil/gpencil_fill.c
source/blender/windowmanager/intern/wm_gesture.c

index f56cbd6..4a890c3 100644 (file)
@@ -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);
 
index 6105a6b..68f463d 100644 (file)
@@ -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;
 
index 70150e4..77734a3 100644 (file)
@@ -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);