jkuhlmann / cgltf

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

Are there any examples? #108

Open ghost opened 4 years ago

ghost commented 4 years ago

Are there any examples for using cgltf? Sadly I couldn't find any in the repo, and the structs alone aren't very useful as documentation for anyone who hasn't deeply studied the gltf specs. (which is what I was hoping to avoid in the first place by using a library)

The following use cases would be interesting to see as examples:

None of these tasks seem obvious to me right now. I see lots of buffers and accessors and what not, but how do they go together? I can't easily tell, an in-depth example would really be eye opening.

ghost commented 4 years ago

Oh right, I forgot gltf can store scenes. I suggest all the examples should just do this with the first model found in the scene. Should be enough to illustrate how it works, hopefully

romainguy commented 4 years ago

Even with this library I highly recommend you read the specs in their entirety. There are a lot of finer points in how to properly handle glTF files that cannot be addressed by cgltf. Examples would be valuable though :)

ghost commented 4 years ago

@romainguy making that call would be a lot easier with examples. right now the library feels like it is written for people who studied the glTF specs for days or weeks, already started implementing it, and then stopped short of completion out of laziness. I think with a bit of documentation it could also be useful to people who just want to load up a model and add more details at some later time, right now that seems kind of impossible with how glTF specs reliant it is. so that is why I am suggesting all these examples

stefanasandei commented 2 years ago

Hello, I'm trying to use this library for my project but I can't find any sample. How can I learn to use cgltf?