Avoiding duplicate texture loads

Dec 16, 2011 at 3:15 AM

When loading my level, I have many objects which use the same texture. i.e. floor is made of 128x128 tile * 20 floor tiles.

Is there a way to avoid loading the same texture so many times? Seems like this is not very efficient, correct

me if I'm wrong.




Dec 16, 2011 at 5:34 AM

If you're working in XNA, using the content pipeline, you can load the texture as many times as you want, and it will only create one copy in memory. You're good to go.

Dec 16, 2011 at 6:13 PM


Jan 8, 2012 at 3:42 PM


I've been rewriting this tool and with the permission of zissakos, I'm now hosting it at http://github.com/stevedunn/gleed2d
In the new tool, when loading a level, it doesn't physically load any textures.  You are just given the properties that describe the asset name of the texture and where it should be placed in your 'World'.