glTF 2.0 parser/loader for C++17, supports many extensions likes `KHR_draco_mesh_compression`, `KHR_lights_punctual`, `KHR_materials_clearcoat`, and more.
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 Draco
KHR_lights_punctual
KHR_materials_clearcoat
KHR_materials_emissive_strength
KHR_materials_ior
KHR_materials_iridescence
KHR_materials_sheen
KHR_materials_specular
KHR_materials_transmission
KHR_materials_unlit
KHR_materials_variants
KHR_materials_volume
KHR_texture_transform
ADOBE_materials_thin_transparency
AGI_articulations
AGI_stk_metadata
CESIUM_primitive_outline
EXT_lights_ies
EXT_mesh_gpu_instancing
EXT_texture_webp
FB_geometry_metadata
MSFT_lod
MSFT_texture_dds
Run
git submodule update --init
Run
cmake -G "[GENERATOR BY YOUR SYSTEM]" [LIBGLTF FOLDER]
libgltf.lib
or libgltf.a
libgltf/libgltf.h
in your project.libgltf.lib
or libgltf.a
in your project.
You have to link the static library
draco.lib
ordraco.a
with 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.