Fonts Won't Show :(

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
Frazz1080
Posts: 41
Joined: Fri Nov 18, 2005 3:09 am

Fonts Won't Show :(

Post by Frazz1080 »

Hi everyone...I'm changing my tune now since I just can't seem to do node interpolation, but I have some know-how in that now, and anything related to that will just be general code questions. I have a few methods to experiment with.
Here is my new problem: I want to build a GUI for my game, but Fonts won't show. I even tried copying and pasting the code from the example given by Niko. Code below:

int main()
{
*Include files, classes, sceneManager/mesh stuff*
gui::IGUIFont* font = device->getGUIEnvironment()->getFont("Font_Arial16.bmp");
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);

*more game code*

while(device->run())
{
if (device->isWindowActive())
{
driver->beginScene(true, true, 0);

//draw some text
if (font)
font->draw(L"This is some text.",
core::rect<s32>(130, 10, 400,50), video::SColor(255,255,255,255));

*end int main()*

The program compiles perfectly, the console window says 'Font_Arial16.bmp loaded', but I have no idea why it's not appearing onscreen. I can get pictures to appear very easily, but no letters. Any tips?
Guest

Post by Guest »

are you having your smgr or gui draw after you have the font draw? you should draw the font last
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Assuming that you are rendering the font last, one other and more obvious question... Was the gui environment able to find and load your font texture? I would expect that it it did not load it you would see an error message in the debug output spew.

Travis
Frazz1080
Posts: 41
Joined: Fri Nov 18, 2005 3:09 am

Post by Frazz1080 »

Dumb question here...how exactly do you use the Debug window? I've never used it before.
Post Reply