mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
128d22e6ee
commit
307e380f30
15 changed files with 202 additions and 171 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue