From: MirceaKitsune Date: Mon, 26 Nov 2012 23:35:18 +0000 (+0200) Subject: Fix forgotten material properties for meshes (also seems to have been forgotten for... X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=5f798d944ee03beca205b107dda58bdc72dd2bf8;p=zefram%2Fminetest%2Fminetest_engine.git Fix forgotten material properties for meshes (also seems to have been forgotten for cubes previously). This allows transparent png images to work properly --- diff --git a/src/content_cao.cpp b/src/content_cao.cpp index c7d21d27..8229ded6 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -923,6 +923,11 @@ public: m_prop.visual_size.X)); u8 li = m_last_light; setMeshColor(m_meshnode->getMesh(), video::SColor(255,li,li,li)); + + m_meshnode->setMaterialFlag(video::EMF_LIGHTING, false); + m_meshnode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false); + m_meshnode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF); + m_meshnode->setMaterialFlag(video::EMF_FOG_ENABLE, true); } else if(m_prop.visual == "mesh"){ infostream<<"GenericCAO::addToScene(): mesh"<getMesh(), video::SColor(255,li,li,li)); + + m_animated_meshnode->setMaterialFlag(video::EMF_LIGHTING, false); + m_animated_meshnode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false); + m_animated_meshnode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF); + m_animated_meshnode->setMaterialFlag(video::EMF_FOG_ENABLE, true); } else errorstream<<"GenericCAO::addToScene(): Could not load mesh "<