From d2e9de93b8d1d6cd45abce8164d0f92af8f636d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 8 Sep 2020 03:34:47 +0200 Subject: GPU: Cleanup implementation casts - Use the syntactic wrap/unwrap method to make code more readable. - Update comment about hidden struct behind opaque types. - Cleanup GPUDrawList type. --- source/blender/gpu/GPU_drawlist.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/blender/gpu/GPU_drawlist.h') diff --git a/source/blender/gpu/GPU_drawlist.h b/source/blender/gpu/GPU_drawlist.h index 27f70da8cf8..485b90f48d4 100644 --- a/source/blender/gpu/GPU_drawlist.h +++ b/source/blender/gpu/GPU_drawlist.h @@ -32,14 +32,15 @@ extern "C" { struct GPUBatch; -typedef void *GPUDrawList; /* Opaque pointer. */ +/** Opaque type hiding blender::gpu::DrawList. */ +typedef struct GPUDrawList GPUDrawList; /* Create a list with at least length drawcalls. Length can affect performance. */ -GPUDrawList GPU_draw_list_create(int length); -void GPU_draw_list_discard(GPUDrawList list); +GPUDrawList *GPU_draw_list_create(int length); +void GPU_draw_list_discard(GPUDrawList *list); -void GPU_draw_list_append(GPUDrawList list, GPUBatch *batch, int i_first, int i_count); -void GPU_draw_list_submit(GPUDrawList list); +void GPU_draw_list_append(GPUDrawList *list, GPUBatch *batch, int i_first, int i_count); +void GPU_draw_list_submit(GPUDrawList *list); #ifdef __cplusplus } -- cgit v1.2.3