Original Post
Hi, I'm trying to think of a good way to design a resource manager for my 3D game -- managing textures, sprites, models, fonts, etc. Did some google searches and searches here on gamedev and found some help. I'm assuming I would have a CResource to abstract what a resource is and then a CResourceManager to hold all allocated resources? I'm a bit confused when it comes to how the resources get created/returned to the programmer. Does the programmer ask the resource manager if a resource with X filename has been allocated and if so the manager returns a pointer to it? And what about if the resource doesn't exist. The programmer would have to load it manually and then pass off a pointer back to the manager? And what about deleting resources? Code samples are appreciated and so is general advice ;)