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

Added 'canvas::into_texture' #2

Merged

Conversation

VictorKoenders
Copy link
Contributor

Using the canvas to make textures at runtime, I noticed a developer has to do

return MyObject {
  texture: canvas.texture.clone()
}

However the canvas is dropped immediately after. It would be more ergonomic to be able to extract the texture from the canvas directly

Copy link
Owner

@17cupsofcoffee 17cupsofcoffee left a comment

Choose a reason for hiding this comment

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

👍 Only reason this doesn't already exist is because I haven't had a use for it yet.

@17cupsofcoffee 17cupsofcoffee merged commit d96bb53 into 17cupsofcoffee:main Sep 12, 2024
@VictorKoenders VictorKoenders deleted the canvas_into_texture branch September 12, 2024 09:14
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