1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Rename SMaterial::TextureLayer -> SMaterial::TextureLayers

It's not the "texture layer" of the material, but an array of texture layers.
This commit is contained in:
Gregor Parzefall
2023-06-24 15:18:10 +02:00
committed by sfan5
parent 05ebe2418b
commit 6bf63d4b41
9 changed files with 38 additions and 38 deletions

View File

@@ -292,8 +292,8 @@ void WieldMeshSceneNode::setExtruded(const std::string &imagename,
// Customize materials
for (u32 layer = 0; layer < m_meshnode->getMaterialCount(); layer++) {
video::SMaterial &material = m_meshnode->getMaterial(layer);
material.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.MaterialType = m_material_type;
material.MaterialTypeParam = 0.5f;
material.BackfaceCulling = true;
@@ -700,10 +700,10 @@ scene::SMesh *getExtrudedMesh(ITextureSource *tsrc,
// Customize materials
for (u32 layer = 0; layer < mesh->getMeshBufferCount(); layer++) {
video::SMaterial &material = mesh->getMeshBuffer(layer)->getMaterial();
material.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayer[0].MinFilter = video::ETMINF_NEAREST;
material.TextureLayer[0].MagFilter = video::ETMAGF_NEAREST;
material.TextureLayers[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].MinFilter = video::ETMINF_NEAREST;
material.TextureLayers[0].MagFilter = video::ETMAGF_NEAREST;
material.BackfaceCulling = true;
material.Lighting = false;
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;