Yet another texture loading problem

Ok, boys and girls, time to introduce myself.  :smiley:

In fact, maybe it is not quite right time, but I was was run out of any other option. Few months ago I found this place and realise that this tool is right for my needs. There was only one problem: I am not only jME n00b, I am Java n00b too  :roll:

It was the reason why I did not apply here sooner, reading Java books was better thing to do. In a mean time, just to satisfy curiosity, I try to run some tutorial example.

Bad move! Now I am not sleeping for two days.

To keep long story short, here is situation:

OS: WinXP; IDE: NetBeans; jME: Downloaded nightly build; Code:

Output result:



Compiling 1 source file to D:My DocumentsJava programiTutorbuildclasses

D:My DocumentsJava cannot find symbol

symbol  : method loadTexture(,int,int,boolean)

location: class com.jme.util.TextureManager

        Texture t = TextureManager.loadTexture(monkeyLoc,Texture.MM_LINEAR,Texture.FM_LINEAR,true);

1 error

BUILD FAILED (total time: 2 seconds)

I guess that this part of code is problematic:


File f = new File("D:/My Documents/Java programi/Tutor/src/Milica.jpg");

        URL monkeyLoc = f.toURL();

        // Use the TextureManager to load a texture

        Texture t = TextureManager.loadTexture(monkeyLoc,Texture.MM_LINEAR,Texture.FM_LINEAR,true);

Suspect that problem is in pointing the texture file. Must say here that I try many diferent aproach, but all of them have same result.

What I am doing wrong?

It's a compile error so it has nothing to do with the texture file.

The method you use has gotten a new parameter in the development version of jME. You can always get an up to date tutorial from CVS. If you don't have acces to CVS or don't want to set this up you can browse the CVS repositry online, here: (in the jmetest.tutorial package)

Or you can get it from the nightly builds source package.

I guess you got the tutorial from the wiki:

I added a link and note there to the CVS browser. If anyone reading this wants to add it to the other tutorials too feel free.

Thank You for fast reply.  :slight_smile:

Will do exactly what You said.

I had the same issue and changed the loadTexture as follows:

Texture t = TextureManager.loadTexture(monkeyLoc, Texture.MM_LINEAR, Texture.FM_LINEAR, 0.0f, true);

Apparently you must pass the ansioLevel(default is 0.0f). I guess this is Anisotropic filtering.