I'm making an alternative to windows explorer, and I am trying to make it so that as you "Walk around" your filesystem, any images in your folders appear as framed pictures hanging on the wall. But for some reason it says it "Could not open file of texture (directory)".
Code: Select all
picture->setMaterialTexture(0, driver->getTexture(core::stringw(CDir.c_str()) + core::stringw(loc->d_name) + "\\"));
Basically what all that nonsense does is create a string of the absolute directory of the image I need. In the case I am testing, it comes out with this:
C:\\3DOS_dummy_folders\\sacred_chao.png\\
Which leaves the translated line of code as:
Code: Select all
picture->setMaterialTexture(0, driver->getTexture(C:\\3DOS_dummy_folders\\sacred_chao.png\\);
I have quadruple-checked, and that is definitely the directory of the image.
So why can't Irrlicht find it?
The relative equivalent of this works fine with a directory like ("../media/image.png");