MCPcopy Create free account
hub / github.com/defold/defold / LoadFromBuffer

Function LoadFromBuffer

engine/modelc/src/modelimporter.cpp:265–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265Scene* LoadFromBuffer(Options* options, const char* suffix, void* data, uint32_t file_size)
266{
267 if (suffix == 0)
268 {
269 printf("ModelImporter: No suffix specified!\n");
270 return 0;
271 }
272
273 if (dmStrCaseCmp(suffix, "gltf") == 0 || dmStrCaseCmp(suffix, "glb") == 0)
274 return LoadGltfFromBuffer(options, data, file_size);
275
276 printf("ModelImporter: File type not supported: %s\n", suffix);
277 return 0;
278}
279
280static void* BufferResolveUri(const char* dirname, const char* uri, uint32_t* file_size)
281{

Callers 9

LoadFromBufferInternalFunction · 0.70
LoadFromPathFunction · 0.70
SetUpMethod · 0.50
SetUpMethod · 0.50
LoadSceneFunction · 0.50
TESTFunction · 0.50
engine.cppFile · 0.50
SetUpMethod · 0.50
SetUpMethod · 0.50

Calls 2

dmStrCaseCmpFunction · 0.85
LoadGltfFromBufferFunction · 0.85

Tested by 6

SetUpMethod · 0.40
SetUpMethod · 0.40
LoadSceneFunction · 0.40
TESTFunction · 0.40
SetUpMethod · 0.40
SetUpMethod · 0.40