gltfpack-sys 0.1.2

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
// This file is part of meshoptimizer library; see meshoptimizer.h for version/license details
#include "meshoptimizer.h"

#ifdef MESHOPTIMIZER_ALLOC_EXPORT
meshopt_Allocator::Storage& meshopt_Allocator::storage()
{
	static Storage s = {::operator new, ::operator delete };
	return s;
}
#endif

void meshopt_setAllocator(void* (MESHOPTIMIZER_ALLOC_CALLCONV* allocate)(size_t), void (MESHOPTIMIZER_ALLOC_CALLCONV* deallocate)(void*))
{
	meshopt_Allocator::Storage& s = meshopt_Allocator::storage();
	s.allocate = allocate;
	s.deallocate = deallocate;
}