Open AllenDang opened 1 year ago
cgltf will parse files with Draco data, but it doesn't have the automatic decompression integrated; similarly to EXT_meshopt_compression, you need to integrate Draco library, and give it the byte stream that you can get from the buffer_view for the mesh with Draco data. If you're looking for examples, Filament should have one (see https://github.com/google/filament/tree/main/libs/gltfio/src)
Ignore message, commented on this issue while trying to comment on raylib one :P
I think we should probably provide some documentation on how to do this in the Readme. In the meantime, I added this functionality to cgltf and tinygltf. If you have a look at tinygltf source, you'll see how the bufferviews are retrieved from the datamodel and fed into the draco library here: https://github.com/syoyo/tinygltf/blob/c201efb9985c89d9d8935a560e0ce92f1acbd165/tiny_gltf.h#L4709
For cgltf, the decoding should look similar.
I noticed in the README states the draco is supported. But I cannot find any instruction but only a
#define CGLTF_EXTENSION_FLAG_DRACO_MESH_COMPRESSION
seems related.How to enable it?