diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 3d8c718c8a9..55abb269660 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -142,7 +142,7 @@ typedef struct LoadTexData { ViewContext *vc; MTex *mtex; - GLubyte *buffer; + uchar *buffer; bool col; struct ImagePool *pool; @@ -160,7 +160,7 @@ static void load_tex_task_cb_ex(void *__restrict userdata, ViewContext *vc = data->vc; MTex *mtex = data->mtex; - GLubyte *buffer = data->buffer; + uchar *buffer = data->buffer; const bool col = data->col; struct ImagePool *pool = data->pool; @@ -230,7 +230,7 @@ static void load_tex_task_cb_ex(void *__restrict userdata, /* Clamp to avoid precision overflow. */ CLAMP(avg, 0.0f, 1.0f); - buffer[index] = 255 - (GLubyte)(255 * avg); + buffer[index] = 255 - (uchar)(255 * avg); } } else { @@ -254,7 +254,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima MTex *mtex = (primary) ? &br->mtex : &br->mask_mtex; ePaintOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags(); - GLubyte *buffer = NULL; + uchar *buffer = NULL; int size; bool refresh; @@ -309,10 +309,10 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima target->old_col = col; } if (col) { - buffer = MEM_mallocN(sizeof(GLubyte) * size * size * 4, "load_tex"); + buffer = MEM_mallocN(sizeof(uchar) * size * size * 4, "load_tex"); } else { - buffer = MEM_mallocN(sizeof(GLubyte) * size * size, "load_tex"); + buffer = MEM_mallocN(sizeof(uchar) * size * size, "load_tex"); } pool = BKE_image_pool_new(); @@ -381,7 +381,7 @@ static void load_tex_cursor_task_cb(void *__restrict userdata, LoadTexData *data = userdata; Brush *br = data->br; - GLubyte *buffer = data->buffer; + uchar *buffer = data->buffer; const int size = data->size; @@ -398,7 +398,7 @@ static void load_tex_cursor_task_cb(void *__restrict userdata, /* Falloff curve. */ float avg = BKE_brush_curve_strength_clamped(br, len, 1.0f); - buffer[index] = (GLubyte)(255 * avg); + buffer[index] = (uchar)(255 * avg); } else { buffer[index] = 0; @@ -411,7 +411,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) bool init; ePaintOverlayControlFlags overlay_flags = BKE_paint_get_overlay_flags(); - GLubyte *buffer = NULL; + uchar *buffer = NULL; int size; const bool refresh = !cursor_snap.overlay_texture || @@ -452,7 +452,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) cursor_snap.size = size; } - buffer = MEM_mallocN(sizeof(GLubyte) * size * size, "load_tex"); + buffer = MEM_mallocN(sizeof(uchar) * size * size, "load_tex"); BKE_curvemapping_init(br->curve); |