Conversation
This is functionally the same but perhaps an Unsupported variant should be added to the enums for the catch all?
|
To appease clippy I had to change some |
Ralith
left a comment
There was a problem hiding this comment.
Thanks for working on this! Out of curiosity, what's your use case for this data?
tl;dr so I can load supercompressed and compressed textures from KTX2 files. I pulled in the So, my goal is support for KTX2 as a container primarily for compressed textures, with or without mipmaps, and perhaps also supporting cubemaps, even if long-term bevy has a different and custom asset metadata format to be able to configure whatever the engine needs. The asset pipeline is the next priority in bevy I think, but it’s good to have good support for glTF 2.0, and KTX2/DDS out of the box. |
Interesting, didn't realize that was at all common. That makes this a pretty key feature! |
Note that while 0 means Unspecified, and ironically is defined in the specification with a particular meaning, because pseudo_enum uses NonZeroU32, it cannot represent 0. As such, I chose to make the members Option<T> and have None mean Unspecified.
0f7a3b4 to
4ff2308
Compare
Fallible parsing returning ParseError Separate out DataFormatDescriptorHeader. Remove size member. Derive Eq + PartialEq. Add constant for DFD header for Basic variant. Remove data_format_descriptor_type method.
Ralith
left a comment
There was a problem hiding this comment.
Thanks, this is looking good! Just a couple nits left.
Ralith
left a comment
There was a problem hiding this comment.
LGTM, thanks for all your work!
Thanks for all the review! :) It’s for sure a better PR because of it. |
Checklist
cargo clippyreports no issuescargo docreports no issuescargo denyissues have been fixed or added todeny.tomlcargo testshows all tests passingAdded new functionality @githubname.Description
Add support for parsing Data Format Descriptor sections from KTX2 files.