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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user