Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiation of Image, Texture and Sprite #2930

Conversation

kurtkuehnert
Copy link
Contributor

Objective

  • Improve the differentiation between an image (data + metadata in RAM), texture (data in VRAM) and sprite (metadata, how to render a 2D image).

Solution

  • renamed the texture module to image
  • moved the texture cache to the render resources where textures are defined
  • renamed lots of variables and types to better reflect what they actually are

Kurt Kühnert added 2 commits October 7, 2021 19:26
moved the texture cache
renamed many texture variables to image
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change C-Docs An addition or correction to our documentation S-Needs-Review labels Oct 7, 2021
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice set of changes! Good TODO comments; and I think this set of names is much clearer.

@alice-i-cecile alice-i-cecile added M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide and removed S-Needs-Migration-Guide labels Jan 20, 2022
@alice-i-cecile
Copy link
Member

@Ku95 what would you like to do with this PR? It's likely to be easier to recreate from scratch at this point.

@kurtkuehnert
Copy link
Contributor Author

@Ku95 what would you like to do with this PR? It's likely to be easier to recreate from scratch at this point.

Yeah that is right. I will probably just close this now. I still think these changes are good for consistencies sake, but I do not have the time currently to update this PR. I think the entire image/texture module should be cleaned up in general.
I have made a PR #4124 that adds support for all wgpu texture formats to the Image struct. There are still some paper cuts in this part of the code base.
If anybody is interested they can pick up this effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Code-Quality A section of code that is hard to understand or change C-Docs An addition or correction to our documentation M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants