| 683 | } |
| 684 | |
| 685 | void MeshRenderer::setModelTexture(std::string_view modelPath, std::string_view texturePath) |
| 686 | { |
| 687 | if (!texturePath.empty()) |
| 688 | setTexture(texturePath); |
| 689 | else if (!_meshTextureHint) |
| 690 | { |
| 691 | auto pos = modelPath.find_last_of('.'); |
| 692 | if (pos != std::string_view::npos) |
| 693 | { |
| 694 | std::string modelTexPath{modelPath}; |
| 695 | modelTexPath.resize(pos); |
| 696 | modelTexPath.append(".png"sv); |
| 697 | setTexture(modelTexPath); |
| 698 | } |
| 699 | } |
| 700 | } |
| 701 | |
| 702 | void MeshRenderer::enableInstancing(MeshMaterial::InstanceMaterialType instanceMat, int count) |
| 703 | { |
no test coverage detected