Ok cool, I think I'll try going down this path
Thanks.
Thanks.
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.
Show posts Menu
Thanks.
I'm aware of jpct desktop and the possibility of using the DeSerializer class, but I'm still lost on how I should handle the MTL files and applying them to the deserialized Object3Ds.
TextureManager textureManager= TextureManager.getInstance();
textureManager.setState(textureManager.getState());
TextureManager textureManager = TextureManager.getInstance();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
for (Object state : textureManager.getState()) {
oos.writeObject(state);
}
oos.writeObject(null); // flag for end of stream when reading in state below
oos.flush();
oos.close();
// restore the texture manager
ObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
List<Object> state = new ArrayList<Object>();
Object o;
while ( (o = ois.readObject()) != null) {
state.add(o);
}
textureManager.setState(state);
Log.d("TextureLoader", "Texture names in the texture manager: " + textureManager.getNames());
Log.d("TextureLoader", "Texture count: " + textureManager.getTextureCount());
Quote
D/TextureLoader﹕ Texture names in the texture manager: [__obj-Color:163/163/163, __obj-Color:0/0/0, --dummy--]
D/TextureLoader﹕ Texture count: 3
Is there something I am not doing properly when serializing or deserializing the texture manager state to where it is properly set up?Page created in 0.032 seconds with 12 queries.