I just wanted to draw a sprite from a bmp file on my screen and I followed parts of the tutorial for 2d graphics... The program works fine, even with transparency and everything but the image is drawn only for a quarter, I can't see the whole image...
Where am I wrong? The image size is 90x145 pixels
This is the important part in the main:
Code: Select all
IrrlichtDevice *device = createDevice(video::EDT_OPENGL,
core::dimension2d<s32>(800,600));
if(device == 0)
return 1;
device->setResizeAble(true);
video::IVideoDriver *driver = device->getVideoDriver();
video::ITexture *img = driver->getTexture("f618e9.bmp");
driver->makeColorKeyTexture(img,core::position2d<s32>(0,0));
while(device->run())
{
driver->beginScene(true,false,video::SColor(255,255,255,255));
driver->draw2DImage(img,core::position2d<s32>(100,100),
core::rect<s32>(0,0,90,145),0,
video::SColor(255,255,255,255),true);
driver->endScene();
}
device->drop();