What's wrong with the texturing?
What's wrong with the texturing?
I've been trying to put on a PNG image on an object, but it seems like it doesn't work. It says the file isn't found. Anyone know how to import the PNG into the program and use it? (Note: Putting it in the default folder or the project folder didn't work).
Re: What's wrong with the texturing?
just make sure it can be found by the app !!!starsgt wrote:It says the file isn't found. Anyone know how to import the PNG into the program and use it? (Note: Putting it in the default folder or the project folder didn't work).
I'm 100% sure the path is wrong !!!
check the working directory and that you use the correct path...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 23
- Joined: Sun Oct 19, 2008 2:35 pm
i'm not gonna lie and say i know irrlicht inside out, but for example just because your model file says it needs for eg C:/examples/texture.png.
does not necessarily mean irrlicht will recognise this.
You must specify in your application that the texture resides in a certain folder or a zip archive for example and load it.
for eg.
you have a model "model.irrmesh" that requires "texture.png"
put them both in a zip file for eg: "example.zip".
and declare in your application , device->getFileSystem()->addZipFileArchive("/path/to/example.zip");
(if you do put them in an archive make sure your model file, do not reference your texture in a specified way for eg. texture = c:/path/to/texture.png(unless you want this)
but let it specify texture = texture.png as what i have experienced is if it is in the same zip file as the model you do not need it referencing it by its path as usually "addZipFileArchive()" sorts all this out)
does not necessarily mean irrlicht will recognise this.
You must specify in your application that the texture resides in a certain folder or a zip archive for example and load it.
for eg.
you have a model "model.irrmesh" that requires "texture.png"
put them both in a zip file for eg: "example.zip".
and declare in your application , device->getFileSystem()->addZipFileArchive("/path/to/example.zip");
(if you do put them in an archive make sure your model file, do not reference your texture in a specified way for eg. texture = c:/path/to/texture.png(unless you want this)
but let it specify texture = texture.png as what i have experienced is if it is in the same zip file as the model you do not need it referencing it by its path as usually "addZipFileArchive()" sorts all this out)
@Acki - I am also 100% sure that the file path is correct. I triple checked it and it still doesn't work. I tried adding png/bmp/jpg at the end and it still doesn't work.
@conallmmcg - Hold on. What other functions do "getFileSystem" have? It might have what I need.
And no I didn't reference my texture in a specified way.
Thanks in advance.
@conallmmcg - Hold on. What other functions do "getFileSystem" have? It might have what I need.
And no I didn't reference my texture in a specified way.
Thanks in advance.
starsgt wrote:@conallmmcg - Hold on. What other functions do "getFileSystem" have? It might have what I need.
Here you go! You'll find that the API documentation (http://irrlicht.sourceforge.net/docu/index.html) can help you out a lot and save you time.
we'll see at the end...starsgt wrote:@Acki - I am also 100% sure that the file path is correct. I triple checked it and it still doesn't work. I tried adding png/bmp/jpg at the end and it still doesn't work.
I guess changeWorkingDirectoryTo(...) can help you...starsgt wrote:What other functions do "getFileSystem" have? It might have what I need.
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Pure virtual means that you're looking at a function that's implemented in a child class of the class you're looking at.
IFileSystem (and almost every other class starting with I) are Interfaces. That means that they just specify what classes like it do, but they don't actually perform those actions themselves. This is useful because even though the file systems for Windows, Mac, and Linux might be different, you can still access each one through a unified interface (IFileSystem from getFileSystem()).
IFileSystem (and almost every other class starting with I) are Interfaces. That means that they just specify what classes like it do, but they don't actually perform those actions themselves. This is useful because even though the file systems for Windows, Mac, and Linux might be different, you can still access each one through a unified interface (IFileSystem from getFileSystem()).