Author Topic: Textures when serializing objects  (Read 3334 times)

Offline RhoX

  • byte
  • *
  • Posts: 29
    • View Profile
Textures when serializing objects
« on: February 21, 2011, 11:26:39 pm »
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:
Code: [Select]
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!

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: Textures when serializing objects
« Reply #1 on: February 21, 2011, 11:35:59 pm »
Is it really *.jpeg? what *.jpg?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Textures when serializing objects
« Reply #2 on: February 22, 2011, 06:54:38 am »
If it says the file isn't there, then the file isn't there. Triple check that everything is correct.

Offline RhoX

  • byte
  • *
  • Posts: 29
    • View Profile
Re: Textures when serializing objects
« Reply #3 on: February 22, 2011, 06:52:46 pm »
Hey guys!

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

Thank you Thomas and EgonOlsen for the help!  ;D