From bac4606937514405641659d91a30bf3e6832cdf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 4 Sep 2020 22:56:30 +0200 Subject: Cleanup: GPUTexture: Remove use of GPU_texture_create_nD Use creation + update function instead. --- source/blender/editors/sculpt_paint/paint_cursor.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c') diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 0486fc9fe0f..4d885364440 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -348,8 +348,8 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima if (!target->overlay_texture) { eGPUTextureFormat format = col ? GPU_RGBA8 : GPU_R8; - target->overlay_texture = GPU_texture_create_nD( - size, size, 0, 2, buffer, format, GPU_DATA_UNSIGNED_BYTE, 0, false, NULL); + target->overlay_texture = GPU_texture_create_2d(size, size, format, NULL, NULL); + GPU_texture_update(target->overlay_texture, GPU_DATA_UNSIGNED_BYTE, buffer); if (!col) { GPU_texture_swizzle_set(target->overlay_texture, "rrrr"); @@ -466,8 +466,8 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) BLI_task_parallel_range(0, size, &data, load_tex_cursor_task_cb, &settings); if (!cursor_snap.overlay_texture) { - cursor_snap.overlay_texture = GPU_texture_create_nD( - size, size, 0, 2, buffer, GPU_R8, GPU_DATA_UNSIGNED_BYTE, 0, false, NULL); + cursor_snap.overlay_texture = GPU_texture_create_2d(size, size, GPU_R8, NULL, NULL); + GPU_texture_update(cursor_snap.overlay_texture, GPU_DATA_UNSIGNED_BYTE, buffer); GPU_texture_swizzle_set(cursor_snap.overlay_texture, "rrrr"); } -- cgit v1.2.3