1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00: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

@ -613,8 +613,8 @@ void Minimap::drawMinimap(core::rect<s32> rect) {
tex.MagFilter = video::ETMAGF_BILINEAR;
});
material.Lighting = false;
material.TextureLayer[0].Texture = minimap_texture;
material.TextureLayer[1].Texture = data->heightmap_texture;
material.TextureLayers[0].Texture = minimap_texture;
material.TextureLayers[1].Texture = data->heightmap_texture;
if (m_enable_shaders && data->mode.type == MINIMAP_TYPE_SURFACE) {
u16 sid = m_shdrsrc->getShader("minimap_shader", TILE_MATERIAL_ALPHA);
@ -634,7 +634,7 @@ void Minimap::drawMinimap(core::rect<s32> rect) {
// Draw overlay
video::ITexture *minimap_overlay = data->minimap_shape_round ?
data->minimap_overlay_round : data->minimap_overlay_square;
material.TextureLayer[0].Texture = minimap_overlay;
material.TextureLayers[0].Texture = minimap_overlay;
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
driver->setMaterial(material);
driver->drawMeshBuffer(m_meshbuffer);
@ -646,7 +646,7 @@ void Minimap::drawMinimap(core::rect<s32> rect) {
matrix.setRotationDegrees(core::vector3df(0, 0, m_angle));
}
material.TextureLayer[0].Texture = data->player_marker;
material.TextureLayers[0].Texture = data->player_marker;
driver->setTransform(video::ETS_WORLD, matrix);
driver->setMaterial(material);
driver->drawMeshBuffer(m_meshbuffer);