Graphics/Material: Add EnableVertexColor temporary
This commit is contained in:
@@ -392,6 +392,25 @@ namespace Nz
|
||||
InvalidatePipeline();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Enable/Disable vertex coloring on this material
|
||||
*
|
||||
* This is a temporary option, until the new material pipeline system is ready, allowing to enable vertex coloring.
|
||||
* This option only works with meshes using vertex colors.
|
||||
*
|
||||
* \param vertexColor Defines if this material will use vertex color or not
|
||||
*
|
||||
* \remark Invalidates the pipeline
|
||||
*
|
||||
* \see HasVertexColor
|
||||
*/
|
||||
inline void Material::EnableVertexColor(bool vertexColor)
|
||||
{
|
||||
m_pipelineInfo.hasVertexColor = vertexColor;
|
||||
|
||||
InvalidatePipeline();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Ensures the pipeline gets updated
|
||||
*
|
||||
@@ -756,6 +775,15 @@ namespace Nz
|
||||
return m_specularMap.IsValid();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Checks whether this material uses vertex coloring
|
||||
* \return true If it is the case
|
||||
*/
|
||||
inline bool Material::HasVertexColor() const
|
||||
{
|
||||
return m_pipelineInfo.hasVertexColor;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Checks whether this material has alpha test enabled
|
||||
* \return true If it is the case
|
||||
|
||||
Reference in New Issue
Block a user