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

Method onLoad

Source/Mogwai/Mogwai.cpp:101–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 void Renderer::onLoad(RenderContext* pRenderContext)
102 {
103 // Load all plugins
104 PluginManager::instance().loadAllPlugins();
105
106 mpExtensions.push_back(MogwaiSettings::create(this));
107 if (gExtensions)
108 {
109 for (auto& f : (*gExtensions)) mpExtensions.push_back(f.second(this));
110 gExtensions.reset();
111 }
112
113 auto regBinding = [this](pybind11::module& m) {this->registerScriptBindings(m); };
114 ScriptBindings::registerBinding(regBinding);
115
116 // Load script provided via command line.
117 if (!mOptions.scriptFile.empty())
118 {
119 if (mOptions.deferredLoad)
120 {
121 loadScriptDeferred(mOptions.scriptFile);
122 }
123 else
124 {
125 loadScript(mOptions.scriptFile);
126 }
127 // Add script to recent files only if not in silent mode (which is used during image tests).
128 if (!mOptions.silentMode) mAppData.addRecentScript(mOptions.scriptFile);
129 }
130
131 // Load pyscene provided via command line.
132 if (!mOptions.sceneFile.empty())
133 {
134 loadScene(mOptions.sceneFile);
135 // Add scene to recent files only if not in silent mode (which is used during image tests).
136 if (!mOptions.silentMode) mAppData.addRecentScene(mOptions.sceneFile);
137 }
138 }
139
140 void Renderer::onOptionsChange()
141 {

Callers

nothing calls this directly

Calls 9

registerBindingFunction · 0.85
loadAllPluginsMethod · 0.80
addRecentScriptMethod · 0.80
addRecentSceneMethod · 0.80
createFunction · 0.50
push_backMethod · 0.45
resetMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected