Commit 128d1e8f authored by bitplane's avatar bitplane

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
parent 62c41e4d
......@@ -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;
......@@ -256,7 +256,7 @@ void CBillboardTextSceneNode::OnRegisterSceneNode()
if (textLength<0.0f)
textLength=1.0f;
// const core::matrix4 &m = camera->getViewFrustum()->Matrices[ video::ETS_VIEW ];
//const core::matrix4 &m = camera->getViewFrustum()->Matrices[ video::ETS_VIEW ];
// make billboard look to camera
core::vector3df pos = getAbsolutePosition();
......@@ -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();
}
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment