21 lines
No EOL
378 B
Python
Executable file
21 lines
No EOL
378 B
Python
Executable file
|
|
class texture_wrapper(object):
|
|
def __init__(self):
|
|
pass
|
|
|
|
def load_name(self, name):
|
|
pass
|
|
|
|
class texture_manager(object):
|
|
def __init__(self):
|
|
self.texture_cache = {}
|
|
def get(self, name):
|
|
if name in self.texture_cache:
|
|
return self.texture_cache[name]
|
|
|
|
t = texture_wrapper()
|
|
t.load_name(name)
|
|
self.texture_cache[name] = t
|
|
return t
|
|
|
|
mgr = texture_manager() |