Login  Register

Re: TextureIO.newTexture returning same target

Posted by JeramieH on Jan 28, 2012; 4:46pm
URL: https://forum.jogamp.org/TextureIO-newTexture-returning-same-target-tp3695673p3696070.html

Here's the function as I'm calling it:
public Texture getTexture (String fname, GL2 gl2) throws Exception
        {
        Texture ret = TextureIO.newTexture(new File("data\\" + fname),false);
        System.out.println("getTexture("+fname+") returned OGL #"+ret.getTarget()+", Texture object:"+ret);
        return ret;
        }
and here's what happens:
Material01:crate.png
Material02:granite.jpg
getTexture(crate.png) returned OGL #3553, Texture object:com.jogamp.opengl.util.texture.Texture@503429
getTexture(granite.jpg) returned OGL #3553, Texture object:com.jogamp.opengl.util.texture.Texture@17bd6a1
and everything renders with the granite texture. The crate.png graphic was working fine alone, so I know that file is OK too.