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
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
#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 · 项目 tests/examples/tinygltf-nofs
构建
- targets
tinygltf (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*
特性
| 特性 | 声明了 |
|---|---|
| default | implies |
| fs | defines |
源文件 (1)
*/tiny_gltf_v3.c