MCPcopy Create free account
hub / github.com/axmolengine/axmol / setModelTexture

Method setModelTexture

core/3d/MeshRenderer.cpp:685–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684
685void 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
702void MeshRenderer::enableInstancing(MeshMaterial::InstanceMaterialType instanceMat, int count)
703{

Callers 4

createMethod · 0.80
createAsyncMethod · 0.80
createMethod · 0.80
createWithColliderMethod · 0.80

Calls 4

emptyMethod · 0.45
find_last_ofMethod · 0.45
resizeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected