transparency of node

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
reetu.raj
Posts: 17
Joined: Wed Aug 27, 2008 5:11 pm
Location: Orlando
Contact:

transparency of node

Post by reetu.raj »

Hi,

I have been trying to deal with the tranparency of node,
here is the little code

<code>

SMaterial mt;
mt.MaterialType=EMT_TRANSPARENT_VERTEX_ALPHA;
mt.MaterialTypeParam=0.01f;
driver->setMaterial(mt);

ITexture* arena_texture=driver->getTexture("../../media/btexture.jpg");
IAnimatedMesh* arena_mesh= smgr->addHillPlaneMesh("arena_mesh", dimension2d<f32>(330,170), dimension2d<u32>(1,1));
ISceneNode* arena_node=smgr->addMeshSceneNode(arena_mesh);
arena_node->setMaterialFlag(EMF_LIGHTING, false);
arena_node->setPosition(vector3df(-90,0,0));
arena_node->setMaterialTexture(0, arena_texture);
</code>

How to set that material on arena_node ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

driver->setMaterial is only necessary when rendering manually (with calls to driver->draw*() ). You simply use arena_node->getMaterial(0)=mt
Post Reply