compat.tinygltf
#includetinygltf v3 — C11-first glTF 2.0 loader and writer (POD API, arena allocator)
#include <tiny_gltf_v3.h>
mcpp add compat.tinygltf@3.1.0
Usage
From this repository's own test project — built and run by CI, not written for the website.
#include <cstdio>
#include <cstring>
#include <filesystem>
#include <string>
#include <tiny_gltf_v3.h>
static const char *kMinimalGltf = R"({
"asset": { "version": "2.0" },
"scenes": [ { "nodes": [] } ]
})";
int main() {
// 1. In-memory parse still works with `default-features = false`.
tinygltf3::Model mem_model;
tinygltf3::ErrorStack mem_errors;
tg3_parse_options opts;
tg3_parse_options_init(&opts);
tg3_error_code err = tg3_parse(
mem_model.get(), mem_errors.get(),
reinterpret_cast<const uint8_t *>(kMinimalGltf),
// …
tests/examples/tinygltf-nofs/tests/test_tinygltf_nofs.cpp · project tests/examples/tinygltf-nofs
Build
- targets
tinygltf (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*
Features
| feature | declares |
|---|---|
| default | implies |
| fs | defines |
Sources (1)
*/tiny_gltf_v3.c