MovableText : Still Not Working...

Problems building or running the engine, queries about how to use features etc.
Post Reply
benject
Kobold
Posts: 29
Joined: Thu May 11, 2006 9:52 am

MovableText : Still Not Working...

Post by benject »

hi ...there's a problem when i using the MovableText Class...
i use them in my code but the application crash...
i put them in my createScene() function..
would someone who use it normally could tell me how to use it??
it almose make me crazy :(
benject
Kobold
Posts: 29
Joined: Thu May 11, 2006 9:52 am

Post by benject »

here is the code

Code: Select all



createScene()
{
//...do a lot of things


MovableText* msg  = new MovableText("TXT_001", "this is the caption"); 
mSceneNode->attachObject(msg); 



}

User avatar
abstractcoder
Gnome
Posts: 336
Joined: Wed Oct 12, 2005 1:50 pm
Location: UK
Contact:

Post by abstractcoder »

that is almost exactly the same code i have used. this is my code:

Code: Select all

mCaption = new MovableText(mName + "_caption",caption,"BlueHighway",75);
mCaption->showOnTop(true);
mMTSceneNode = mSceneNode->createChildSceneNode(mName + "_captionSceneNode");
mMTSceneNode->attachObject(mCaption);
mMTSceneNode->translate(Vector3(0,200,0));
mCaption is a pointer same as you have, and caption is just a string passed to the function. i have also changed the font as it was still using an old font that is not being used by ogre any more. we should probably change this on the wiki. i also changed the size.

hope that helps.
User avatar
Red5_StandingBy
Greenskin
Posts: 109
Joined: Mon Jun 26, 2006 1:06 pm
Location: Turkey

Post by Red5_StandingBy »

I also experience a crash when using MovableText code from the wiki. I have traced to crash to MovableText::_setupGeometry() function. Near the end:

Code: Select all

 // Unlock vertex buffer
 ptbuf->unlock();
causes a crash in DEBUG mode. In RELEASE mode there is no crash but then there is no text either.

The setup is: WinXP-ATI Radeon9800, VS8.0, Render System=Direct3D9
Post Reply