def getTex(self,name,category):
if category not in self.categoriesTexCache:<EOL><INDENT>return self.getMissingTex(category)<EOL><DEDENT>if name not in self.categoriesTexCache[category]:<EOL><INDENT>self.loadTex(name,category)<EOL><DEDENT>return self.categoriesTexCache[category][name]<EOL>
Gets the texture associated with the given name and category.

``category`` must have been created using :py:meth:`addCategory()` before.

If it was loaded previously, a cached version will be returned.
If it was not loaded, it will be loaded and inserted into the cache.

See :py:meth:`loadTex()` for more information.