jkuhlmann / cgltf

:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99
MIT License
1.42k stars 135 forks source link

Implement support for EXT_texture_webp #253

Closed bobbens closed 1 month ago

bobbens commented 2 months ago

Specification: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp

bobbens commented 2 months ago

Oops, it's EXT_texture_webp, not KHR_texture_webp.

zeux commented 2 months ago

This needs to be structured like KHR_texture_basisu; the current implementation for example doesn’t support specifying both png and webp images. Also missing cgltf_write support.

bobbens commented 2 months ago

This needs to be structured like KHR_texture_basisu; the current implementation for example doesn’t support specifying both png and webp images. Also missing cgltf_write support.

How does it look now?

bobbens commented 1 month ago

I added a call to CGLTF_PTRFIXUP in cgltf_fixup_pointers. Hopefully should be fine now.

zeux commented 1 month ago

And one more thing :sweat_smile: I think this is missing writing the appropriate extension name in cgltf_write_extensions, so a written file with webp extension will be considered invalid by glTF spec (although this would not necessarily interfere with loading it).

bobbens commented 1 month ago

Lots of things I missed when grepping. Completed now perhaps.