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>2019-05-31 02:45:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-09-17 16:16:43 +0300
commit3a08153d7a842b7ab1e40a9048730e1a3ddab5f7 (patch)
tree37e7c902ceb35c5626644ccbbc7e0376e169e56c /source/blender/gpu/GPU_batch.h
parent41299bce936afb5e7da9c332d1140c5a77d49317 (diff)
DRW: Refactor to support draw call batching
Reviewers: brecht Differential Revision: D4997
Diffstat (limited to 'source/blender/gpu/GPU_batch.h')
-rw-r--r--source/blender/gpu/GPU_batch.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h
index 175033f70d9..7d8c3347eb4 100644
--- a/source/blender/gpu/GPU_batch.h
+++ b/source/blender/gpu/GPU_batch.h
@@ -193,6 +193,17 @@ GPUBatch *create_BatchInGeneral(GPUPrimType, VertexBufferStuff, ElementListStuff
#endif /* future plans */
+/* GPUDrawList is an API to do lots of similar drawcalls very fast using multidrawindirect.
+ * There is a fallback if the feature is not supported. */
+typedef struct GPUDrawList GPUDrawList;
+
+GPUDrawList *GPU_draw_list_create(int length);
+void GPU_draw_list_discard(GPUDrawList *list);
+void GPU_draw_list_init(GPUDrawList *list, GPUBatch *batch);
+void GPU_draw_list_command_add(
+ GPUDrawList *list, int v_first, int v_count, int i_first, int i_count);
+void GPU_draw_list_submit(GPUDrawList *list);
+
void gpu_batch_init(void);
void gpu_batch_exit(void);