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

Reading glTF binary files in GLB format #249

Closed native-engine closed 4 months ago

native-engine commented 4 months ago

Does cgltf allow you to read binary glTF files? If yes, can I see an example somewhere?

zeux commented 4 months ago

cgltf_parse_file (see example in the README) will automatically handle .glb files the same as .gltf; calling cgltf_load_buffers after that will associate internal buffer pointers with the embedded binary data which will lead to other accessor helpers to work transparently.

native-engine commented 4 months ago

Got it, thank you very much!