I started messing around with the 2D parts of Irrlicht and am trying to load a large background image. Unfortunately, it won't load and I don't know why. Heres the code that creates and displays it and the error message. The image is located in the same folder as the project code.
Creates:
ITexture* map = driver->getTexture("maptest1.bmp");
driver->makeColorKeyTexture(map, core::position2d<s32>(0,0));
Displays:
driver->beginScene(true, true, video::SColor(255,255,255,255));
driver->draw2DImage(map, core::position2d<s32>(0,0),
core::rect<s32>(0,0,200,200), 0, SColor(255,255,255,255), true);
driver->endScene();
Error Message:
"Could not open file of texture: maptest1.bmp"
*Any help on this would be appreciated.*
Loading image problem.
...and I fix it how?
Ok, that doesn't help me because I don't know what MSVC directories are or how they work. Could you tell me a possible way to fix it please?
Re: Loading image problem.
It should be located in the same folder as the EXE file.Nosvera2 wrote:I started messing around with the 2D parts of Irrlicht and am trying to load a large background image. Unfortunately, it won't load and I don't know why. Heres the code that creates and displays it and the error message. The image is located in the same folder as the project code.
Try starting the application from his directory and not from your IDE, if you didn't do it yet.
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Re: ...and I fix it how?
Depends. Could you press F1 or Google?Nosvera2 wrote:Ok, that doesn't help me because I don't know what MSVC directories are or how they work. Could you tell me a possible way to fix it please?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Non-power-of 2????
Ok, thanks to the guy above the guy above this post, I got it loading the image. However, now I get this error I've never seen before and don't understand.
"Performance warning, slow loading of non power of 2 texture."
Does this mean the pixel size of the texture has to be a power of 2? Cuz the pic is 200x200 pixels, which is a power of 2.
"Performance warning, slow loading of non power of 2 texture."
Does this mean the pixel size of the texture has to be a power of 2? Cuz the pic is 200x200 pixels, which is a power of 2.