1
0
Fork 0
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:
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

@ -112,7 +112,7 @@ Hud::Hud(Client *client, LocalPlayer *player,
rangelim(g_settings->getS16("selectionbox_width"), 1, 5);
} else if (m_mode == HIGHLIGHT_HALO) {
m_selection_material.setTexture(0, tsrc->getTextureForMesh("halo.png"));
m_selection_material.setFlag(video::EMF_BACK_FACE_CULLING, true);
m_selection_material.BackfaceCulling = true;
} else {
m_selection_material.MaterialType = video::EMT_SOLID;
}