Error while trying to load .SER file in jPCT-AE

Started by BABABLACK_911, December 31, 2012, 08:54:54 AM

Previous topic - Next topic

BABABLACK_911

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.


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...


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


Hope anyone can solve my query. :)

EgonOlsen

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.