Textures when serializing objects

Started by RhoX, February 21, 2011, 11:26:39 PM

Previous topic - Next topic

RhoX

Hey folks!

I was trying to serialize some objects but I´ve always got the following error:
Loading Texture...C:/grassy.jpeg
[ Mon Feb 21 19:17:51 BRT 2011 ] - ERROR: File 'C:/grassy.jpeg' not found - replacement texture used instead!


I've already tried to make many changes to correct this problem, but I couldn't solve it (the grassy.jpeg file is there, I've checked!). Sorry if there already is another topic with the same subject, I didn't find it.

The code that I've used was:
TextureManager.getInstance().flush();
TextureManager tm = TextureManager.getInstance();

Object3D objMD2 = null;

        objMD2 = Loader.loadMD2("C:/bird.md2",1);

        Texture texMD2; 
        texMD2 = new Texture("C:/grassy.jpeg");

        tm.addTexture("bird", texMD2);
        objMD2.setTexture("bird");
        objMD2.build();
       
        DeSerializer de;
        de = new DeSerializer();
        FileOutputStream outputObjMD2 = new FileOutputStream( "C:/serbird.ser");
        de.serialize(objMD2, outputObjMD2, true);


Thanks you in advance!

Thomas.


EgonOlsen

If it says the file isn't there, then the file isn't there. Triple check that everything is correct.

RhoX

Hey guys!

I've solved the problem: the correct extension was *.jpg, not *.jpeg (¬¬).
Sorry ^^'!

Thank you Thomas and EgonOlsen for the help!  ;D