drawing text in demo keep lost.why?

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
ijo coim
Posts: 57
Joined: Fri Mar 25, 2005 1:29 pm
Location: indonesia, jogja-jogja

drawing text in demo keep lost.why?

Post by ijo coim »

hi forum,

hemmmmm....i'd try to find this problem for 6 hours, but i don't get the answer.

the problem is very-very simple. i just want to make a drawing text like in turtorial 6.

Code: Select all

if (keterangan)
{swprintf ( tmp_min, 100, L"AKTIFa"); 
keterangan->draw(tmp_min,core::rect<s32>(200,10,300,30),video::SColor(255,148,255,0));}

i write this code in demo main program

Code: Select all

while(device->run() && driver)
{
  if(device->isWindowActive())
...
}
first, it work.it show the text in createLoadingScreen. but after loading screen, the text is lost.

i'd try to disable backColor.set(255,90,90,156), but nothing is happen.
the text still lost. it seems that some thing was erase the text when the void change from createLoadingScreen() to loadSceneData().

maybe you have the same problem like me.

thanks in advance.

regards,

ijo coim
bitmapbrother
Posts: 34
Joined: Wed Aug 10, 2005 6:15 am

Post by bitmapbrother »

Should work - just check if your drawing code is between beginScene and endScene like this:

Code: Select all

  gui::IGUIFont* font=device->getGUIEnvironment()->getBuiltInFont(); 
	
  while(device->run())
	{
		if(device->isWindowActive())
		{ 
	    driver->beginScene(true, true, video::SColor(255,113,113,133));
      font->draw(L"ARROWS - move character",core::rect<s32>(10,5,300,50),video::SColor(255,255,255,255));
      font->draw(L"ESC - quit",core::rect<s32>(10,15,300,50),video::SColor(255,255,255,255));
 	    smgr->drawAll();
	    driver->endScene();
        ...
ijo coim
Posts: 57
Joined: Fri Mar 25, 2005 1:29 pm
Location: indonesia, jogja-jogja

IN Other program maybe work, but in demo?

Post by ijo coim »

wow, very fast reply.

thanks bitmapbrother.

have you tried this in demo? if you try your code, you will see how is the problem.

while in createLoadingScreen, it'll show the word." ARROWS".

but, after the program come into the createLoadingScene (especially panorama camera), the text is lost.

i still understand why the text get lost.

try it.

thanks for your reply bitmapbrother

(sory with my poor english)

regards,

ijo coim
bitmapbrother
Posts: 34
Joined: Wed Aug 10, 2005 6:15 am

Post by bitmapbrother »

Which demo u think?
Post Reply