-
Notifications
You must be signed in to change notification settings - Fork 4
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
Decode and encode Texture2D from webp, png, jpg formats #292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When creating the task, I also said to add the From/To methods to Texture2D
, which would use CpuTexture2D
for now. This missing.
NoiseEngine.Native/src/interop/rendering/cpu_texture_interop.rs
Outdated
Show resolved
Hide resolved
pub enum TextureFileFormat { | ||
Png, | ||
Jpeg, | ||
Webp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not it be WebP
?
imo it's not a good idea to maintain 2 apis that do exactly the same thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintaining similar API in Texture2D
allows us to read the developer's behavior. So we can better implement decoding/encoding such textures in the future using GPU accelarated encoders or technologies like DirectX DirectStorage.
closes #281