Files

VDE Official glTF/GLB Format Plugin

P4-06 dogfood: pure C ABI format plugin, no kernel link, no external JSON library.

Capabilities

format:gltf.read
format:gltf.write

Read

  • .gltf JSON with embedded base64 data URI or relative external .bin;
  • .glb binary JSON+BIN chunks;
  • core mesh: POSITION FLOAT VEC3, indices U8/U16/U32 or non-indexed;
  • TRIANGLES (4), TRIANGLE_STRIP (5), TRIANGLE_FAN (6); multiple meshes/primitives -> one body per primitive;
  • scenes/nodes: scene roots, children, matrix, translation/rotation/scale;
  • sparse POSITION and index accessors (U8/U16/U32 sparse indices);
  • static morph targets: POSITION deltas + mesh/node weights;
  • validates asset.version 2.x, buffer/bufferView/accessor bounds, stride, component type.

Write

  • host body_tessellate -> one mesh/primitive per body;
  • POSITION/NORMAL/indices accessors with min/max;
  • .glb: JSON+BIN chunks, 4-byte alignment, total length;
  • .gltf: JSON + sidecar .bin;
  • write_memory: self-contained .gltf with embedded base64.

Known limitations

  • core triangle mesh only;
  • no materials/textures, skins, animations, Draco/meshopt, or animation-driven morph weights;
  • reader ignores NORMAL/material attributes;
  • one body per primitive.

Build

cmake --build build --target vde_official_gltf

Output:

build/plugins/official/gltf/vde_official_gltf.dll
build/plugins/official/gltf/vde-plugin.json

Smoke

powershell -NoProfile -ExecutionPolicy Bypass -File plugins/official/gltf/run_smoke.ps1

The smoke uses a mock host and does not link the kernel.

License

Apache-2.0.