MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / GenerateBoxScene

Method GenerateBoxScene

SampleFramework12/v1.00/Graphics/Model.cpp:576–594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void Model::GenerateBoxScene(const Float3& dimensions, const Float3& position,
577 const Quaternion& orientation, const wchar* colorMap,
578 const wchar* normalMap)
579{
580 meshMaterials.Init(1);
581 MeshMaterial& material = meshMaterials[0];
582 material.TextureNames[uint64(MaterialTextures::Albedo)] = colorMap;
583 material.TextureNames[uint64(MaterialTextures::Normal)] = normalMap;
584 fileDirectory = L"..\\Content\\Textures\\";
585 LoadMaterialResources(meshMaterials, L"..\\Content\\Textures\\", false, materialTextures, descriptorHeap);
586
587 vertices.Init(NumBoxVerts);
588 indices.Init(NumBoxIndices);
589
590 meshes.Init(1);
591 meshes[0].InitBox(dimensions, position, orientation, 0, vertices.Data(), indices.Data());
592
593 CreateBuffers();
594}
595
596void Model::GenerateBoxTestScene()
597{

Callers

nothing calls this directly

Calls 4

LoadMaterialResourcesFunction · 0.85
InitBoxMethod · 0.80
InitMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected