Skip to content

glTF 2.0 parser/loader for C++11, supports many extensions likes `KHR_draco_mesh_compression`, `KHR_lights_punctual`, `KHR_materials_clearcoat`, and more.

master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

libgltf

glTF status libgltf document visit milestones CII best practices

build Coverage Status

Codacy Total alerts Language grade: Python

Support Become a patreon

This project was generated by glTF 2.0 JSON schema and support to load the glTF 2.0 file to a struct SGlTF.

It was used in glTFForUE4.

Features

  • glTF 2.0
  • Load the gltf/embedded/glb file
  • This is a static library
  • Cross platform
  • C++11
  • Supports the Unicode and UTF8
  • Supports some extensions
    • KHR_draco_mesh_compression - Google's Draco
    • KHR_lights_punctual
    • KHR_materials_pbrSpecularGlossiness
    • KHR_materials_clearcoat
    • and more
  • Platforms
    • Windows
      • Win32 (win32)
      • x64 (win64)
    • Linux (linux)
    • macOS (macos)
    • Android
      • armeabi-v7a
      • armeabi-v7a-with-neon
      • arm64-v8a
      • x86
      • x86_64
    • iOS
      • iOS (iphoneos)
      • watchOS (watchos)
      • simulator

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 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 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(/*your gltf file*/);
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.

About

glTF 2.0 parser/loader for C++11, supports many extensions likes `KHR_draco_mesh_compression`, `KHR_lights_punctual`, `KHR_materials_clearcoat`, and more.

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.