mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +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:
@@ -66,11 +66,11 @@ void GUIScene::setTexture(u32 idx, video::ITexture *texture)
|
||||
material.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
material.MaterialTypeParam = 0.5f;
|
||||
material.TextureLayer[0].Texture = texture;
|
||||
material.setFlag(video::EMF_LIGHTING, false);
|
||||
material.setFlag(video::EMF_FOG_ENABLE, true);
|
||||
material.setFlag(video::EMF_BILINEAR_FILTER, false);
|
||||
material.setFlag(video::EMF_BACK_FACE_CULLING, false);
|
||||
material.setFlag(video::EMF_ZWRITE_ENABLE, true);
|
||||
material.Lighting = false;
|
||||
material.FogEnable = true;
|
||||
material.TextureLayer[0].BilinearFilter = false;
|
||||
material.BackfaceCulling = false;
|
||||
material.ZWriteEnable = video::EZW_AUTO;
|
||||
}
|
||||
|
||||
void GUIScene::draw()
|
||||
|
Reference in New Issue
Block a user