Adding a Texture to IBillboardTextSceneNode

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
pwierz
Posts: 59
Joined: Sun Aug 20, 2006 3:32 pm

Adding a Texture to IBillboardTextSceneNode

Post by pwierz »

I'm trying to add a texture to a IBillboardTextSceneNode. My goal is to create a bubble around the text but I can't get it to do it. Can anyone tell me what's wrong with the code?

Code: Select all

	scene::IBillboardTextSceneNode* bb = mgr->addBillboardTextSceneNode(mgr->getGUIEnvironment()->getBuiltInFont(),
L"Test",0,core::dimension2d<f32>(64,64),core::vector3df(0.0,0.0,0.0),-1,video::SColor(255,255,255,255),video::SColor(255,255,255,255));
	bb->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
	bb->setMaterialFlag(video::EMF_LIGHTING, false); 
	bb->setMaterialTexture(1,texture); //texture is an already loaded tex
All I'm getting is the text. Thanks.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

BillboardText is using billboards to produce the text. It's not a combination of text and generic billboard. Just add a billboard to the scene graph.
Post Reply