My screen is HD and when i get the resolution with a nulldevice it get it right: 1920 x 1080
Then my goal is to display an image fullscreen here is my code:
Code: Select all
//t_sz = resolution get by the nulldevice
IrrlichtDevice *device =
createDevice(video::EDT_OPENGL, t_sz, 48,
true, true, true, 0);
if (!device)
return 1;
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
IGUIFont *big = guienv->getFont("../media/Fonts/Arial_26/Arial_26.xml");
ITexture *image = driver->getTexture("../media/assasin.bmp");
driver->makeColorKeyTexture(image, core::position2d<s32>(0, 0));
[...code without incidence on the picture...]
while (device->run())
{
driver->beginScene(true, true, SColor(255, 100, 101, 140));
driver->draw2DImage(image, core::position2d<s32>(0, 0),
core::rect<s32>(0, 0, 1920, 1080), 0);
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
and i get this:
https://drive.google.com/file/d/0BznWzJ ... sp=sharing
Thanks for the help
I apologize if this tobic isn't in the right place it's my first post