comparison pytouhou/opengl/texture.py @ 158:7769ce7be03c

Minor cleanup
author Thibaut Girka <thib@sitedethib.com>
date Mon, 10 Oct 2011 18:56:13 +0200
parents fad7b44cebf2
children df8b2ab54639
comparison
equal deleted inserted replaced
157:ca6f8b3f739d 158:7769ce7be03c
19 19
20 class TextureManager(object): 20 class TextureManager(object):
21 def __init__(self, loader=None): 21 def __init__(self, loader=None):
22 self.loader = loader 22 self.loader = loader
23 self.textures = {} 23 self.textures = {}
24
24 25
25 def __getitem__(self, key): 26 def __getitem__(self, key):
26 if not key in self.textures: 27 if not key in self.textures:
27 self.textures[key] = self.load_texture(key) 28 self.textures[key] = self.load_texture(key)
28 return self.textures[key] 29 return self.textures[key]