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

Method GeneratePlaneScene

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

Source from the content-addressed store, hash-verified

613}
614
615void Model::GeneratePlaneScene(const Float2& dimensions, const Float3& position,
616 const Quaternion& orientation, const wchar* colorMap,
617 const wchar* normalMap)
618{
619 meshMaterials.Init(1);
620 MeshMaterial& material = meshMaterials[0];
621 material.TextureNames[uint64(MaterialTextures::Albedo)] = colorMap;
622 material.TextureNames[uint64(MaterialTextures::Normal)] = normalMap;
623 fileDirectory = L"..\\Content\\Textures\\";
624 LoadMaterialResources(meshMaterials, L"..\\Content\\Textures\\", false, materialTextures, descriptorHeap);
625
626 vertices.Init(NumPlaneVerts);
627 indices.Init(NumPlaneIndices);
628
629 meshes.Init(1);
630 meshes[0].InitPlane(dimensions, position, orientation, 0, vertices.Data(), indices.Data());
631
632 CreateBuffers();
633}
634
635void Model::Shutdown()
636{

Callers

nothing calls this directly

Calls 4

LoadMaterialResourcesFunction · 0.85
InitPlaneMethod · 0.80
InitMethod · 0.45
DataMethod · 0.45

Tested by

no test coverage detected