MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / importFromMemory

Method importFromMemory

Source/Falcor/Scene/SceneBuilder.cpp:296–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294 }
295
296 void SceneBuilder::importFromMemory(const void* buffer, size_t byteSize, std::string_view extension, const pybind11::dict& dict)
297 {
298 logInfo("Importing scene from memory");
299 std::map<std::string, std::string> materialToShortName = convertDictToMap(dict);
300
301 mSceneData.importPaths.push_back("<memory>");
302 mSceneData.importDicts.push_back(materialToShortName);
303
304 if (auto importer = Importer::create(extension))
305 {
306 importer->importSceneFromMemory(buffer, byteSize, extension, *this, materialToShortName);
307 }
308 else
309 {
310 throw ImporterError("", "Unknown file extension.");
311 }
312 }
313
314 void SceneBuilder::pushAssetResolver()
315 {

Callers

nothing calls this directly

Calls 6

logInfoFunction · 0.85
convertDictToMapFunction · 0.85
ImporterErrorFunction · 0.85
createFunction · 0.50
push_backMethod · 0.45
importSceneFromMemoryMethod · 0.45

Tested by

no test coverage detected