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:
authorClément Foucault <foucault.clem@gmail.com>2020-09-08 04:34:47 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-08 05:15:50 +0300
commitd2e9de93b8d1d6cd45abce8164d0f92af8f636d0 (patch)
treeaee6755004778a92e294484b4dfcc38a87820a0f /source/blender/gpu/GPU_drawlist.h
parent33b25b6a9e86082a40a24b14bb0a6aad708dfb11 (diff)
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.
Diffstat (limited to 'source/blender/gpu/GPU_drawlist.h')
-rw-r--r--source/blender/gpu/GPU_drawlist.h11
1 files changed, 6 insertions, 5 deletions
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
}