Giter VIP home page Giter VIP logo

libgltf's Introduction

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

  • glTF 2.0
  • Load the gltf/embedded/glb file
  • This is a static library
  • Cross platform
  • C++17
  • Supports the Unicode and UTF8
  • Supports some extensions
    • 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
  • 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 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

libgltf's People

Contributors

alexchicn avatar azure-pipelines[bot] avatar fossabot avatar gitter-badger avatar jixingcn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libgltf's Issues

Problem with glb images

I'm using libgltf in a game engine, and I noticed that the textures were not loading correctly when using a glb file. I tracked the problem down to the LoadByUri() function, where in the case of glb, it was just returning the whole binary chunk. I changed the code so that LoadByUri() uses the image's buffer view offset and size to point to the correct PNG data inside the chunk. Would you be interested in this code change?

Instruction

About libgltf

It is a C++ library to load and parse the glTF 2.0 file. You can see README.md.

GitHub Action

You can download the compiled static library files from the Actions page for Win32, Win64, Linux, Android, macOS, and iOS platforms.

The compiled libraries were compiled with /MT for Win32 and Win64

License

Looks like this project is being developed as a glTF importer for UE4. What License is this being developed under? There might be interest in the glTF community to collaborate on it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.