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.
-
ArcticFox
- Posts: 13
- Joined: Mon Oct 25, 2010 6:12 pm
- Location: Romania
Post
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.
Last edited by
ArcticFox on Thu Dec 09, 2010 7:10 pm, edited 1 time in total.
-
elfuz
- Posts: 14
- Joined: Wed Oct 13, 2010 10:20 am
Post
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?
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Post
by randomMesh »
I bet that menu_background.jpg is NPOT. Make sure that it's a power of two in width and height.
"Whoops..."
-
randomMesh
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Post
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.
"Whoops..."
-
easy
- Posts: 14
- Joined: Thu Dec 09, 2010 11:14 am
- Location: Hungary
Post
by easy »
How do you start up Irrlicht? In 32 bit mode?
-
ArcticFox
- Posts: 13
- Joined: Mon Oct 25, 2010 6:12 pm
- Location: Romania
Post
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