Page 1 of 1

Adding a Texture to IBillboardTextSceneNode

Posted: Sat Feb 13, 2010 6:33 pm
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.

Posted: Sun Feb 14, 2010 12:52 pm
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.