2D graphics

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
thojoh370
Posts: 12
Joined: Sun Nov 04, 2007 7:22 pm
Location: Linköping, Sweden
Contact:

2D graphics

Post by thojoh370 »

Hey,
As some of you might already know, I am attempting to create an FPS. But the problem is (both on this and on another project), that the 2D image files that I load and place on the game screen doesn't show up! The code I use is the one from the tutorial:

Code: Select all

video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
gui::IGUIEnvironment* env = device->getGUIEnvironment();

driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);

// add irrlicht logo
env->addImage(driver->getTexture("../../media/irrlichtlogoalpha.tga"),
    core::position2d<s32>(10,10));
The FPS project loads a quake3 map, and the other project loads an .irr file, if that makes sense. And perhaps I've put this code in the wrong place?
Programmers don't DIE, they just GOSUB and then RETURN.
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

First make sure Irrlicht loaded image. Look in to console window, there should be something like "Loaded texture: irrlichtlogoalpha.tga".

Second check if you draw gui properly. guienv->drawAll(); should be called afther smgr->drawAll();.
thojoh370
Posts: 12
Joined: Sun Nov 04, 2007 7:22 pm
Location: Linköping, Sweden
Contact:

No errors

Post by thojoh370 »

Irrlicht did succeed in loading the image. No problems there.
(In fact, I borrowed the code from one of the tutorials (the terrain one), and yet it doesn't show up.)

EDIT: It doesnt show up in the console either. :?
Programmers don't DIE, they just GOSUB and then RETURN.
Post Reply