Page 1 of 1

drawing text in demo keep lost.why?

Posted: Fri Aug 12, 2005 10:02 am
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

Posted: Fri Aug 12, 2005 11:00 am
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();
        ...

IN Other program maybe work, but in demo?

Posted: Fri Aug 12, 2005 1:51 pm
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

Posted: Fri Aug 12, 2005 2:04 pm
by bitmapbrother
Which demo u think?