MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Blast / onInitialize

Method onInitialize

samples/SampleBase/renderer/Renderer.cpp:242–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void Renderer::onInitialize()
243{
244 // search paths
245 m_resourceManager.addSearchDir("..\\..\\samples\\resources");
246 m_resourceManager.addSearchDir("..\\..\\..\\samples\\resources");
247 for (const std::string& d : getManager()->getConfig().additionalResourcesDir)
248 {
249 m_resourceManager.addSearchDir(d.c_str());
250 }
251
252 // debug primitive render material and input layout
253 {
254 m_debugPrimitiveRenderMaterial = new RenderMaterial(m_resourceManager, "debug_primitive", "");
255
256 D3D11_INPUT_ELEMENT_DESC layout[] = {
257 { "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0 },
258 { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0 }
259 };
260
261 m_debugPrimitiveRenderMaterialInstance = m_debugPrimitiveRenderMaterial->getMaterialInstance(layout, ARRAYSIZE(layout));
262 }
263}
264
265void Renderer::onTerminate()
266{

Callers

nothing calls this directly

Calls 2

addSearchDirMethod · 0.80
getMaterialInstanceMethod · 0.80

Tested by

no test coverage detected