Graphics/Shader: Make texture units statics

Provides better performances and prevents the sampler type bug to happen
This commit is contained in:
Lynix
2016-12-18 01:13:46 +01:00
parent 1a8805aad1
commit 682dab32b3
10 changed files with 203 additions and 183 deletions

View File

@@ -1356,6 +1356,11 @@ namespace Nz
return s_defaultMaterial;
}
inline int Material::GetTextureUnit(TextureMap textureMap)
{
return s_textureUnits[textureMap];
}
inline void Material::InvalidatePipeline()
{
m_pipelineUpdated = false;