Add sprite atlas generation code to 2D API. #7
Labels
enhancement
An enhancement to current functionality.
feature-request
A new feature for Gorgon or its tool(s).
v3
Applies to version 3.x
Projects
Add a service object that allows a user to pass in a series of GorgonSprite objects to pack onto 1 or more texture atlases. Sprites will be returned that point at the new texture(s) when done.
The object should take:
When processing, this will take the sprite texture coordinates (converted to pixel coordinates), and copy that rectangle onto a destination texture. The algorithm will work similarly to the Glyph packing algorithm in GorgonFont and will try to utilize the space as best as it can. If the texture size/array size is exceeded, then a new texture should be created.
The processing method should return a data structure that contains:
The text was updated successfully, but these errors were encountered: