|
SBgl 0.1.0
A graphics framework in C99
|
#include "sbgl_batcher.h"
Go to the source code of this file.
Functions | |
| uint32_t | sbgl_bake_commands (const sbgl_DrawPacket *packets, uint32_t packetCount, sbgl_IndirectCommand *outCommands, uint32_t maxCommands) |
| uint32_t sbgl_bake_commands | ( | const sbgl_DrawPacket * | packets, |
| uint32_t | packetCount, | ||
| sbgl_IndirectCommand * | outCommands, | ||
| uint32_t | maxCommands ) |
Bakes an array of sorted draw packets into optimized indirect commands.
The system groups contiguous draw packets that share the same mesh, material, and sort key into single multi-instance draw calls. This reduction minimizes the overhead of submitting thousands of individual commands to the graphics hardware.
| packets | A contiguous array of draw packets, assumed to be sorted. |
| packetCount | Total number of packets provided in the input array. |
| outCommands | Destination array for generated indirect commands. |
| maxCommands | Maximum number of commands the output array can hold. |
Definition at line 3 of file sbgl_batcher.c.