sprite sheet maker
Prove sprite readbacks occupy the byte slots named in an export manifest
An editor can pack several sprite readbacks into one writable buffer. A correct image in a misplaced slot still produces a broken export. ModernGL's readback write offset identifies a byte position in the destination. It doesn't select the source rectangle or adjust for row alignment.
Build the slot table before any image writes. Record each payload's starting byte, byte length, dimensions, component count, and row pitch. For an illustrative tight RGB export, a 3-by-2 tile takes 18 bytes. A second slot starting after it must account for the header and those 18 bytes. If the read uses a different alignment, record that layout and calculate the second offset from the aligned row pitches instead.
Initialize the slots and any padding with sentinel bytes, then fill the second slot first. An independent reader should recover its intended dimensions and pixel values while both the first slot and the trailer still match their sentinels. Repeat with a three-byte RGB row to expose assumptions about alignment. technical guide and test fixture documents a smaller RGBA readback with known offsets. A manifest and a separate reader make a useful pair of checks for an importer serving multiple game tools.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.