The project includes a generator that can generate codes by glTF 2.0 JSON schema.
It is used in glTFForUE4.
KHR_draco_mesh_compression - Google's DracoKHR_lights_punctualKHR_materials_clearcoatKHR_materials_emissive_strengthKHR_materials_iorKHR_materials_iridescenceKHR_materials_sheenKHR_materials_specularKHR_materials_transmissionKHR_materials_unlitKHR_materials_variantsKHR_materials_volumeKHR_texture_transformADOBE_materials_thin_transparencyAGI_articulationsAGI_stk_metadataCESIUM_primitive_outlineEXT_lights_iesEXT_mesh_gpu_instancingEXT_texture_webpFB_geometry_metadataMSFT_lodMSFT_texture_ddsRun
git submodule update --init
Run
cmake -G "[GENERATOR BY YOUR SYSTEM]" [LIBGLTF FOLDER]
libgltf.lib or libgltf.alibgltf/libgltf.h in your project.libgltf.lib or libgltf.a in your project.
You have to link the static library
draco.libordraco.awith your project, if you want to support the Google's Draco. And you can find the draco in the external folder.
Code example:
std::shared_ptr<libgltf::IglTFLoader> gltf_loader = libgltf::IglTFLoader::Create(/*a function to load the file by std::istream*/);
std::shared_ptr<libgltf::SGlTF> loaded_gltf = gltf_loader->glTF().lock();
if (!loaded_gltf)
{
printf("failed to load your gltf file");
}
This software is released under the MIT license.