www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: mystara on May 06, 2008, 08:17:02 pm

Title: Identifying the dummy textures?
Post by: mystara 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.


Title: Re: Identifying the dummy textures?
Post by: EgonOlsen 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.
Title: Re: Identifying the dummy textures?
Post by: mystara on May 06, 2008, 08:30:23 pm
Ah, okay, excellent.

Thanks!