| 654 | } |
| 655 | |
| 656 | void Model::LoadMaterialResources(MeshMaterial& material, const wstring& directory, ID3D11Device* device) |
| 657 | { |
| 658 | // Load the diffuse map |
| 659 | wstring diffuseMapPath = directory + material.DiffuseMapName; |
| 660 | if(material.DiffuseMapName.length() > 1 && FileExists(diffuseMapPath.c_str())) |
| 661 | material.DiffuseMap = LoadTexture(device, diffuseMapPath.c_str()); |
| 662 | |
| 663 | // Load the normal map |
| 664 | wstring normalMapPath = directory + material.NormalMapName; |
| 665 | |
| 666 | if(material.NormalMapName.length() > 1 && FileExists(normalMapPath.c_str())) |
| 667 | material.NormalMap = LoadTexture(device, normalMapPath.c_str()); |
| 668 | } |
| 669 | |
| 670 | void Model::WriteToFile(const wchar* path, ID3D11Device* device, ID3D11DeviceContext* context) |
| 671 | { |
nothing calls this directly
no test coverage detected