Page 1 of 1
[SOLVED] 16bit background
Posted: Wed Dec 08, 2010 8:12 pm
by ArcticFox
I don't know what I'm doing wrong but the background image is shown in 16bit when it should be in 32bit this is the code I got for now
Code: Select all
env->addImage(driver->getTexture("base/menu_background.jpg"), position2d<int>(0,0));
while(device->run())
{
driver->beginScene(true, true, SColor(0,200,200,200));
env->drawAll();
driver->endScene();
}
device->drop();
Any ideas what I could do to fix it, thanks.
Posted: Wed Dec 08, 2010 9:28 pm
by elfuz
there seems nothing wrong with the code.
could you post a screenshot and the original jpg file so we can have a look?
Posted: Wed Dec 08, 2010 11:15 pm
by randomMesh
I bet that menu_background.jpg is NPOT. Make sure that it's a power of two in width and height.
Posted: Thu Dec 09, 2010 2:08 pm
by ArcticFox
Posted: Thu Dec 09, 2010 5:16 pm
by randomMesh
ArcticFox wrote:its 1280x960
Neither 1280 nor 960 is a
power of two. I'd change the image dimensions and see if it fixes your issue.
Posted: Thu Dec 09, 2010 6:53 pm
by easy
How do you start up Irrlicht? In 32 bit mode?
Posted: Thu Dec 09, 2010 7:02 pm
by ArcticFox
I have recreated the image and now its 1024x1024 but nothing changes
EDIT:
If you mean this
Code: Select all
createDevice( video::EDT_SOFTWARE, dimension2d<u32>(1024, 800), 32, false, false, false, 0);
then yes
EDIT2:
Found the issue
using EDT_SOFTWARE will load the image in 16bit but changing to EDT_DIRECT3D8 will load the image in 32bit
Thanks for the help, I appreciate it