Author Topic: Identifying the dummy textures?  (Read 2023 times)

Offline mystara

  • int
  • **
  • Posts: 79
    • View Profile
Identifying the dummy textures?
« on: May 06, 2008, 08:17:02 pm »
Hello,

Is there any way to determine, in the texture manager, which textures are dummies and which textures have already been loaded? I notice that I can get the current dummy texture, but how can I tell which references in the texture manager were created when I loaded some structure and which point to some actual texture in memory?

I assume it's not sufficient to do an equlity test with the current dummy texture, as they each have different names. I also notice an "isEnabled" function for Textures, but I'm not exactly sure what this represents and when it's set.

Specifically, I'm trying to load a structure from XML and then load the textures that are referenced by the XML document. I don't want to load the textures in advance.



Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Identifying the dummy textures?
« Reply #1 on: May 06, 2008, 08:23:58 pm »
Testing the textures for equality with the dummy texture should work. The name is a property of the TextureManager, not of the texture itself.

Offline mystara

  • int
  • **
  • Posts: 79
    • View Profile
Re: Identifying the dummy textures?
« Reply #2 on: May 06, 2008, 08:30:23 pm »
Ah, okay, excellent.

Thanks!