Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index e04bbc1f2bf..3fbd4a8f736 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -59,7 +59,6 @@
#include "ED_view3d.h"
#include "ED_clip.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "RNA_access.h"
@@ -68,6 +67,9 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "GPU_colors.h"
+#include "GPU_primitives.h"
+
#include "gpencil_intern.h"
/* ******************************************* */
@@ -1339,21 +1341,15 @@ static void gpencil_draw_eraser(bContext *UNUSED(C), int x, int y, void *p_ptr)
tGPsdata *p = (tGPsdata *)p_ptr;
if (p->paintmode == GP_PAINTMODE_ERASER) {
- glPushMatrix();
-
- glTranslatef((float)x, (float)y, 0.0f);
-
- glColor4ub(255, 255, 255, 128);
+ gpuCurrentColor4x(CPACK_WHITE, 0.500f);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_BLEND);
-
- glutil_draw_lined_arc(0.0, M_PI * 2.0, p->radius, 40);
-
+
+ gpuSingleCircle(x, y, p->radius, 40);
+
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
-
- glPopMatrix();
}
}
@@ -1564,7 +1560,7 @@ static void gpencil_draw_apply_event(wmOperator *op, wmEvent *event)
p->curtime = PIL_check_seconds_timer();
/* handle pressure sensitivity (which is supplied by tablets) */
- if (event->custom == EVT_DATA_TABLET) {
+ if (event->customdatatype == EVT_DATA_TABLET) {
wmTabletData *wmtab = event->customdata;
tablet = (wmtab->Active != EVT_TABLET_NONE);