Fixed bug 3017433, billboard text node should generate stuff in OnAnimate, not OnRegisterSceneNode

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3591 dfc29bdd-3216-0410-991c-e03cc46cb475
master
bitplane 2011-02-06 04:49:26 +00:00
parent 62c41e4d3e
commit 128d1e8fe8
2 changed files with 13 additions and 6 deletions

View File

@ -236,7 +236,7 @@ void CBillboardTextSceneNode::setText(const wchar_t* text)
//! pre render event
void CBillboardTextSceneNode::OnRegisterSceneNode()
void CBillboardTextSceneNode::OnAnimate(u32 timeMs)
{
if (!IsVisible || !Font || !Mesh)
return;
@ -319,7 +319,10 @@ void CBillboardTextSceneNode::OnRegisterSceneNode()
BBox = Mesh->getBoundingBox();
core::matrix4 mat( getAbsoluteTransformation(), core::matrix4::EM4CONST_INVERSE );
mat.transformBoxEx(BBox);
}
void CBillboardTextSceneNode::OnRegisterSceneNode()
{
SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT);
ISceneNode::OnRegisterSceneNode();
}

View File

@ -69,6 +69,10 @@ namespace scene
//! destructor
virtual ~CBillboardTextSceneNode();
//! sets the vertex positions etc
virtual void OnAnimate(u32 timeMs);
//! registers the node into the transparent pass
virtual void OnRegisterSceneNode();
//! renders the node.