Home

Awesome

libgltf

glTF status libgltf document visit milestones

build Coverage status from coveralls Codacy Badge Language grade: Python

FOSSA Status CII best practices support

The project includes a generator that can generate codes by glTF 2.0 JSON schema.

It is used in glTFForUE4.

Features

Getting Started

  1. Update the submodule

    Run git submodule update --init

  2. Generate the project by CMake

    Run cmake -G "[GENERATOR BY YOUR SYSTEM]" [LIBGLTF FOLDER]

  3. Build the project and generate the static library libgltf.lib or libgltf.a
  4. Include libgltf/libgltf.h in your project.
  5. Link the static library libgltf.lib or libgltf.a in your project.

    You have to link the static library draco.lib or draco.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");
}

License

This software is released under the MIT license.

FOSSA Status