[SOLVED] setMag/MinFilter does nothing

Hey again. I’m trying to get rid of my texture bleeding issue and have attempted

texture.setMagFilter(Texture.MagFilter.Nearest);
texture.setMinFilter(Texture.MinFilter.NearestNoMipMaps);

But it does nothing. Am I using it wrong?

EDIT: Was using it on the wrong texture…

Hm … should work.

Here is some code from: jmonkeyengine/BitmapFontLoader.java at master · jMonkeyEngine/jmonkeyengine · GitHub

MaterialDef spriteMat = 
    (MaterialDef) assetManager.loadAsset(
    new AssetKey("Common/MatDefs/Misc/Unshaded.j3md"));

and

Texture tex = null;

and

TextureKey key = new TextureKey(folder + file, true);
key.setGenerateMips(false);
tex = assetManager.loadTexture(key);
tex.setMagFilter(Texture.MagFilter.Bilinear);
tex.setMinFilter(Texture.MinFilter.BilinearNoMipMaps);

and

Material mat = new Material(spriteMat);
mat.setTexture("ColorMap", tex);
mat.setBoolean("VertexColor", true);
mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
matPages[index] = mat;

This happens before the letter quads are being generated.

Maybe you make a small code example with an example texture that demonstrate the not working things. Then we could see if that fails on our computer with jME 3.0 / jME 3.1. And the gurus might step in and answer your questions. :chimpanzee_smile:

I was using it on a texture loaded through the assetManager. I thought it would update the cached texture. I had to use it on the texture I loaded the second time.