Skip to content

Conversation

@einarf
Copy link
Member

@einarf einarf commented Jan 14, 2024

The current TextureAtlas is weakly referecing textures supporting python garbage collection. The plan was to completely remove this due to the complexity it adds. I think we've maanged to figure out the remaining issues.

Fixes:

  • Textures are now stored using the Texture.atlas_name meaning we only store textures with different hash-orientation combo. It doesn't care what hitbox algo the texture has. This mean the number of textures in the atlas are always the same as the uv data simplifying things.
  • Resizing the atlas should no longer clear the image counter
  • Rebuilding the atlas should now clear the image counter
  • The atlas will now smartly rebuild itself if images have been removed before attempting to resize
  • Added an initial ABC class for atlases
  • Added sanity check in image ref counter raising error on underflow
  • Fixed the experimenal atlas load/save code
  • Added various comments to make it easier to inspect the code later

@einarf einarf merged commit 630a4f4 into development Jan 14, 2024
@einarf einarf deleted the atlas-rabbit-hole branch January 14, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants