gltfpack-sys 0.1.1

Rust bindings for gltfpack - optimize and compress glTF/GLB files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "../meshoptimizer/gltf/gltfpack.h"

// Forward declarations
extern Settings defaults();
extern int gltfpack(const char* input, const char* output, const char* report, Settings settings);

extern "C" {

// Compress with maximum compression (equivalent to gltfpack -cc)
int compress(const char* input, const char* output) {
    Settings settings = defaults();
    settings.compress = true;
    settings.compressmore = true;
    return gltfpack(input, output, NULL, settings);
}

}