Added depth sorting attribute to Material class

Only works for billboards for now


Former-commit-id: 50a46d3266a2e7fc6d75629103ad8b7193b13bf3
This commit is contained in:
Lynix
2014-09-11 00:10:24 +02:00
parent 04be41082c
commit a008439cde
3 changed files with 15 additions and 1 deletions

View File

@@ -152,6 +152,11 @@ void NzMaterial::EnableAlphaTest(bool alphaTest)
InvalidateShaders();
}
void NzMaterial::EnableDepthSorting(bool depthSorting)
{
m_depthSortingEnabled = depthSorting;
}
void NzMaterial::EnableLighting(bool lighting)
{
m_lightingEnabled = lighting;
@@ -320,6 +325,11 @@ bool NzMaterial::IsAlphaTestEnabled() const
return m_alphaTestEnabled;
}
bool NzMaterial::IsDepthSortingEnabled() const
{
return m_depthSortingEnabled;
}
bool NzMaterial::IsEnabled(nzRendererParameter parameter) const
{
#ifdef NAZARA_DEBUG
@@ -376,6 +386,7 @@ void NzMaterial::Reset()
m_alphaThreshold = 0.2f;
m_alphaTestEnabled = false;
m_ambientColor = NzColor(128, 128, 128);
m_depthSortingEnabled = false;
m_diffuseColor = NzColor::White;
m_diffuseSampler = NzTextureSampler();
m_lightingEnabled = true;