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

Refactor the way you set material properties

Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
This commit is contained in:
Gregor Parzefall
2023-06-23 11:33:23 +02:00
committed by sfan5
parent 128d22e6ee
commit 307e380f30
15 changed files with 202 additions and 171 deletions

View File

@@ -608,7 +608,9 @@ void Minimap::drawMinimap(core::rect<s32> rect) {
matrix.makeIdentity();
video::SMaterial &material = m_meshbuffer->getMaterial();
material.setFlag(video::EMF_TRILINEAR_FILTER, true);
material.forEachTexture([] (video::SMaterialLayer &tex) {
tex.TrilinearFilter = true;
});
material.Lighting = false;
material.TextureLayer[0].Texture = minimap_texture;
material.TextureLayer[1].Texture = data->heightmap_texture;