aboutsummaryrefslogtreecommitdiff
path: root/util/sokol_spritebatch.h
Commit message (Collapse)AuthorAgeFilesLines
* Release pipeline pool on shutdownStuart Adams2021-07-281-1/+2
|
* Added shaders for different platforms + misc fixesStuart Adams2021-07-271-114/+1156
|
* sbatch_pipeline APIStuart Adams2021-07-251-42/+171
| | | the sbatch_pipeline helps users make a pipeline object that is correct and usable for the sbatch rendering API.
* Take sprite color as an optional pointer to constStuart Adams2021-07-241-21/+19
| | | Unfrotunately sokol's 0 initialise to default idiom does not play nicely with color data, as 0'd out sg_color would ideally be set to a sensible default, white. However, 0'd out sg_color is also a valid color, transparent, which can result in undesirable effects if you are lerping color to transparent.
* Update sokol_spritebatch.hStuart Adams2021-07-231-545/+829
| | | Reworked the API to use contexts. Removed internal sorting of sprites (for now, at least). Adjusted naming. Introduced push_sprite_rect which lets you create a sprite to be rendered at a specific destination rectangle.
* sokol_spritebatch.hStuart2021-06-301-0/+852
An XNA-style spritebatch library on top of sokol_gfx. Relies on premultiplied alpha for blending. Takes care of orthographic projection internally. Sorts the sprites that have been submitted to ensure the fewest draw calls are made.