47 status(
"Initialising default mesh containers...");
51 wirebox->
setName(
"defaultWireBox");
56 meshFont->
setName(
"defaultMeshFont");
61 meshQuad->
setName(
"defaultMeshQuad");
73 std::map<Common::UString, Mesh *>::iterator iter =
_resourceMap.begin();
75 Mesh *mesh = iter->second;
76 if (mesh->useCount() == 0) {
89 std::map<Common::UString, Mesh *>::iterator iter =
_resourceMap.find(mesh->getName());
100 std::map<Common::UString, Mesh *>::iterator iter =
_resourceMap.find(mesh->getName());
107 std::map<Common::UString, Mesh *>::iterator iter =
_resourceMap.find(name);
116 std::map<Common::UString, Mesh *>::iterator inext = iter;
A class holding an UTF-8 string.
const Common::UString & getName() const
Dedicated mesh used for dynamic font rendering.
void init()
General mesh initialisation, queuing the mesh for GL resource creation.
Mesh * getMesh(const Common::UString &name)
Returns a mesh with the given name, or zero if it does not exist.
void delMesh(Mesh *mesh)
Forcibly remove the mesh from the map.
Utility templates and functions.
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
std::map< Common::UString, Mesh * >::iterator delResource(std::map< Common::UString, Mesh *>::iterator iter)
void cleanup()
Remove any resource that has a usage count of zero.
std::map< Common::UString, Mesh * > _resourceMap
void status(const char *s,...)
void deinit()
Deinitialise mesh management subsystem.
void setName(const Common::UString &name)
void addMesh(Mesh *mesh)
Adds a mesh to be managed.
void init()
Initialise mesh management, including default mesh creation.