Author Topic: Error while trying to load .SER file in jPCT-AE  (Read 2320 times)

Offline BABABLACK_911

  • byte
  • *
  • Posts: 14
    • View Profile
Error while trying to load .SER file in jPCT-AE
« on: December 31, 2012, 08:54:54 am »
Hi, recently i deserialied an OBJ using jPCT's Desktop Version. (Deserializer)
I Got the resultant .ser file but the problem is that when I try to use that .SER in HelloWorld-AE Example, All I see is the blank screen.

Here's how I deserialized the OBJ file.

Code: [Select]
static Object3D cube = null;

public static void main(String[] args) {
// TODO Auto-generated method stub

try {
cube = Object3D.mergeAll(Loader.loadOBJ(("models/cube.obj"), null, 10));
cube.build();
new DeSerializer().serialize(cube, new FileOutputStream("ser/cube.ser"), true);
System.out.println("done:");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

And this is what I did in HelloWorld-AE Example...

Code: [Select]

      cube = Loader.loadSerializedObject(res.openRawResource(R.raw.cube));
      cube.build();
      world.addObject(cube);

Hope anyone can solve my query. :)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Error while trying to load .SER file in jPCT-AE
« Reply #1 on: January 01, 2013, 11:00:14 am »
I don't think that this has anything to do with the file itself. It's more likely that you just don't look at your cube, are standing right inside it or have no lighting set. Make sure to clear the frame buffer in some other color than black so that you can see a black cube to cover the case of insufficient lighting.