Ok cool, I think I'll try going down this path 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
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
Page created in 0.018 seconds with 12 queries.