Graphics/BasicMaterial: Add IsAlphaTestEnabled()
This commit is contained in:
parent
3cd9172f7a
commit
298beaedc0
|
|
@ -30,6 +30,8 @@ namespace Nz
|
||||||
inline const std::shared_ptr<Texture>& GetDiffuseMap() const;
|
inline const std::shared_ptr<Texture>& GetDiffuseMap() const;
|
||||||
inline const TextureSamplerInfo& GetDiffuseSampler() const;
|
inline const TextureSamplerInfo& GetDiffuseSampler() const;
|
||||||
|
|
||||||
|
inline bool IsAlphaTestEnabled() const;
|
||||||
|
|
||||||
inline bool HasAlphaMap() const;
|
inline bool HasAlphaMap() const;
|
||||||
inline bool HasAlphaTest() const;
|
inline bool HasAlphaTest() const;
|
||||||
inline bool HasAlphaTestThreshold() const;
|
inline bool HasAlphaTestThreshold() const;
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,12 @@ namespace Nz
|
||||||
return m_material.GetTextureSampler(m_textureIndexes.diffuse);
|
return m_material.GetTextureSampler(m_textureIndexes.diffuse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool BasicMaterial::IsAlphaTestEnabled() const
|
||||||
|
{
|
||||||
|
NazaraAssert(HasAlphaTest(), "Material has no alpha test condition");
|
||||||
|
return m_material.IsConditionEnabled(m_conditionIndexes.alphaTest);
|
||||||
|
}
|
||||||
|
|
||||||
inline bool BasicMaterial::HasAlphaMap() const
|
inline bool BasicMaterial::HasAlphaMap() const
|
||||||
{
|
{
|
||||||
return m_textureIndexes.alpha != MaterialSettings::InvalidIndex;
|
return m_textureIndexes.alpha != MaterialSettings::InvalidIndex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue