16
Support / Re: Loading big models (memory issues)
« on: September 10, 2010, 02:08:23 pm »
Yes, that's the point. I'm already serializing/deserializing the model... (And enabling the reduced mode)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
TextureManager texMan = TextureManager.getInstance();
DeSerializer des = new DeSerializer();
char c = File.separatorChar;
File dir = new File("raw");
String[] files = dir.list();
for (int i = 0; i < files.length; i++) {
String name = files[i];
if (name.toLowerCase().endsWith(".jpg")) {
texMan.addTexture(name, new Texture("raw" + c + name));
}
}
Object3D[] objs = Loader.loadOBJ("raw/raw.obj","raw/raw.mtl", 1);
OutputStream os = new FileOutputStream("raw.ser");
objs[0].build();
des.serialize(objs[0], os, true);
But when loading the model in Android with Loader.loadSerializedObject(...) the textures won't appear.