-
Notifications
You must be signed in to change notification settings - Fork 144
How to enable draco support? #215
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
Comments
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: For cgltf, the decoding should look similar. |
I'd like to comment on that since I am trying to figure out the simplest way to make it work as well. The difficulty is that there is no simple way to add buffers or buffer views to a cgltf_data instance. Using cgltf_buffer_view->data is also not convenient because it would require to use the same buffer data for indices and vertices. |
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?
The text was updated successfully, but these errors were encountered: