Graphics/Sprite: Add [Get|Set]TextureCoords & SetTextureRect

This commit is contained in:
Jérôme Leclercq
2021-11-24 22:00:29 +01:00
parent b8b0552a4e
commit c9aba016a8
5 changed files with 64 additions and 11 deletions

View File

@@ -21,6 +21,12 @@ namespace Nz
return AddPass(registry.GetPassIndex(passName), std::move(pass));
}
inline const std::shared_ptr<MaterialPass>& Material::FindPass(const std::string& passName) const
{
auto& registry = Graphics::Instance()->GetMaterialPassRegistry();
return GetPass(registry.GetPassIndex(passName));
}
inline const std::shared_ptr<MaterialPass>& Material::GetPass(std::size_t passIndex) const
{
if (passIndex >= m_passes.size())