Graphics: Add initial support for transparency
This commit is contained in:
@@ -182,6 +182,14 @@ namespace Nz
|
||||
InvalidatePipeline();
|
||||
}
|
||||
|
||||
inline void MaterialPass::EnableFlag(MaterialPassFlag flag, bool enable)
|
||||
{
|
||||
if (enable)
|
||||
m_flags |= flag;
|
||||
else
|
||||
m_flags &= ~flag;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Enable/Disable scissor test for this material
|
||||
*
|
||||
@@ -306,6 +314,11 @@ namespace Nz
|
||||
return m_pipelineInfo.lineWidth;
|
||||
}
|
||||
|
||||
inline MaterialPassFlags MaterialPass::GetFlags() const
|
||||
{
|
||||
return m_flags;
|
||||
}
|
||||
|
||||
inline const ShaderAst::ConstantValue& MaterialPass::GetOptionValue(std::size_t optionIndex) const
|
||||
{
|
||||
assert(optionIndex < m_optionValues.size());
|
||||
@@ -458,6 +471,11 @@ namespace Nz
|
||||
return m_pipelineInfo.faceCulling;
|
||||
}
|
||||
|
||||
inline bool MaterialPass::IsFlagEnabled(MaterialPassFlag flag) const
|
||||
{
|
||||
return m_flags.Test(flag);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Checks whether this material has scissor test enabled
|
||||
* \return true If it is the case
|
||||
|
||||
Reference in New Issue
Block a user