mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-19 21:35:46 +01: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:
@@ -50,9 +50,11 @@ static video::SMaterial baseMaterial()
|
||||
|
||||
static inline void disableTextureFiltering(video::SMaterial &mat)
|
||||
{
|
||||
mat.setFlag(video::E_MATERIAL_FLAG::EMF_BILINEAR_FILTER, false);
|
||||
mat.setFlag(video::E_MATERIAL_FLAG::EMF_TRILINEAR_FILTER, false);
|
||||
mat.setFlag(video::E_MATERIAL_FLAG::EMF_ANISOTROPIC_FILTER, false);
|
||||
mat.forEachTexture([] (video::SMaterialLayer &tex) {
|
||||
tex.BilinearFilter = false;
|
||||
tex.TrilinearFilter = false;
|
||||
tex.AnisotropicFilter = 0;
|
||||
});
|
||||
}
|
||||
|
||||
Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShaderSource *ssrc) :
|
||||
|
||||
Reference in New Issue
Block a user