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

Clarify create_from_image() usage #63127

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Jul 17, 2022

create_from_image() should be always used to create ImageTexture and can no longer be used on existing ImageTexture. I don't know the internals exactly, but judging from the old descriptions there is no point in reusing ImageTexture as create_from_image() is the most expensive part of it anyway.

Resolves #63025
Closes #63131

EDIT:
Turns out there is some use case-case for updating ImageTexture, which is when you have multiple copies of it and want to update all of them, so I updated the PR to expose set_image().

@Zylann
Copy link
Contributor

Zylann commented Jul 18, 2022

update was clear, the problem was that I couldn't notice create_from_image was static #63131 (comment)

@akien-mga akien-mga merged commit 0f60283 into godotengine:master Jul 20, 2022
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the raise_from_picture branch July 20, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImageTexture.update() doesn't seem to work Image importing no longer working
4 participants