An R package containing the unmodified, header-only cgltf v1.15 loader for loading glTF and GLB files. The package supplies headers for downstream R packages and includes a small compiled C check accessible from R.
Package versions use major.minor.patch-revision: 1.15.0 corresponds to
upstream cgltf 1.15, and -1 identifies the first vendored revision. The suffix
tracks package-specific changes, including adaptations for CRAN.
Install locally with R CMD INSTALL /path/to/cgltf.
Consumer R packages add cgltf (>= 1.15.0-1) to LinkingTo in DESCRIPTION
and include <cgltf.h>. Define CGLTF_IMPLEMENTATION before the include in
exactly one C or C++ translation unit per downstream package:
#define CGLTF_IMPLEMENTATION
#include <cgltf.h>
Keep R's standard -DNDEBUG compilation flag when compiling the implementation.
It disables upstream assertions that could otherwise terminate the R process.
Custom build systems must also define NDEBUG.
The exported cgltf_test() function calls a registered C routine that
checks scene parsing, validation, node transformations, and rejection of
malformed JSON. The routine is compiled when installing from source; running
the function requires no compiler or additional R packages:
stopifnot(cgltf::cgltf_test())
The package is fully developed for its intended role as a header provider. The R function verifies the installation; a general R interface to cgltf is outside the scope of this submission.
Download the latest successful main source build. Open that page and use its Download the R source tarball link. The filename and release notes identify the package version, branch, full commit SHA, and build run; the notes also include the tarball's SHA-256 checksum. These are development source packages, not CRAN releases or compiled binaries.
Build R source package
runs R CMD build for every branch push, pull requests targeting main, and
manual runs. Every successful run has a downloadable Actions artifact retained
for 30 days. Successful main-branch pushes and manual runs also publish durable
release assets. Pull requests and other branches cannot replace main's download.
The release page selects a new download only after the uploaded tarball has been downloaded again and its checksum verified. Older runs cannot replace a newer main build, and previous assets remain available at their original URLs. Use the linked package asset rather than GitHub's autogenerated source archives.