I am too stupid to draw Images :(

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
Lupinius
Posts: 11
Joined: Thu Apr 30, 2009 8:50 pm
Location: Emden, Germany

I am too stupid to draw Images :(

Post by Lupinius »

I'm trying to make a little test programm with IrrLicht, but I cant' get it to draw images. My (relevant) code:

Code: Select all

IrrlichtDevice *device = createDevice( video::EDT_OPENGL, core::dimension2d<s32>(800, 600), 16,
                        false, false, false, 0);
	if (!device)
		return 1;
	device->setWindowCaption(L"Hello World!");

	video::IVideoDriver* driver = device->getVideoDriver();

	video::ITexture *Image = driver->getTexture("ball.bmp");

while(device->run()) {

		driver->beginScene();

		core::position2d<s32> m = device->getCursorControl()->getPosition();

		driver->draw2DImage(Image, m, core::rect<s32>(0,0,50,50), 0, video::SColor(255,255,255,255), false);
		
        driver->endScene();
    }
But the image isn't drawed. What am I doing wrong?
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

what does your console output say about loading the texture?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

yeah, the code should work...
I bet the texture was not loaded !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply