1 #ifndef BZ_GFX_DRAW_QUEUE_H
2 #define BZ_GFX_DRAW_QUEUE_H
4 #include <bz/memory/arena.h>
5 #include <bz/types/common.h>
11 typedef struct BZDrawQueue BZDrawQueue
;
12 typedef BZDrawQueue
* BZDrawQueueID
;
14 typedef void (*BZDrawQueueCall
)(void *userParameter
);
15 typedef void (*BZDrawQueueSortFunction
)(void);
17 extern BZDrawQueueID
bzGfxDrawQueueCreate(BZMemoryArenaID arena
, const char *identifierFmt
, ...);
18 extern void bzGfxDrawQueueTeardown(BZDrawQueueID drawQueue
);
20 extern void bzGfxDrawQueueSetSortFunction(BZDrawQueueID drawQueue
, BZDrawQueueSortFunction sortFunction
); // FIXME, use this for map thing.
22 extern size_t bzGfxDrawQueueEnqueuedInstructionCount(BZDrawQueueID drawQueue
);
24 extern void bzGfxDrawQueueClear(BZDrawQueueID drawQueue
);
25 //extern void bzGfxDrawQueueEnqueue(BZDrawQueueID drawQueue, BZRect cullRect, BZDrawQueueCall drawCall, void *userParameter);
26 //extern BZMemoryArenaID bzGfxDrawQueueEnqueueExt(BZDrawQueueID drawQueue, uint8_t sortIdx, BZDrawQueueCall drawCall);
27 //extern void bzGfxDrawQueueEnqueue(BZDrawQueueID drawQueue, uint8_t sortIdx, BZDrawQueueCall drawCall, size_t userParameterSize, void *userParameter);
28 extern void *bzGfxDrawQueueEnqueue(BZDrawQueueID drawQueue
, uint8_t sortIdx
, BZDrawQueueCall drawCall
, size_t userParameterSize
);
30 extern void bzGfxDrawQueueRun(BZDrawQueueID drawQueue
);
31 extern void bzGfxDrawQueueRunSortBin(BZDrawQueueID drawQueue
, uint8_t sortIdx
);