DRW: Refactor to support draw call batching

Reviewers: brecht

Differential Revision: D4997
This commit is contained in:
2019-05-31 01:45:41 +02:00
parent f7e8b58098
commit ce34a6b0d7
57 changed files with 2292 additions and 1270 deletions

View File

@@ -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);