Author Topic: Question about textures  (Read 1901 times)

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Question about textures
« on: July 21, 2008, 08:17:44 pm »
Hi, here is my question. Can I load a TextureManager from an object without having the files on my disc, for example lets say I use an ObjectOutputStream to save the TextureManager, can I restore it fro mthat file eve withput having the jpg files on my disc? will it work?
Nada por ahora

Offline JavaMan

  • long
  • ***
  • Posts: 231
    • View Profile
Re: Question about textures
« Reply #1 on: July 21, 2008, 11:35:36 pm »
It may work. I suppose it depends whether the Textures are attached to the TextureManager or not. Just try it out!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Re: Question about textures
« Reply #2 on: July 22, 2008, 12:00:31 am »
It should work. The TextureManager has a getState() that is meant for serialization. Just serialize the returned Vector and feed it back into the manager using setState(). At least it worked when i wrote that methods... ;)
« Last Edit: July 22, 2008, 03:46:11 pm by EgonOlsen »