PolyResourceManager.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * PolyResourceManager.h
  3. * Poly
  4. *
  5. * Created by Ivan Safrin on 8/30/08.
  6. * Copyright 2008 __MyCompanyName__. All rights reserved.
  7. *
  8. */
  9. // @package Services
  10. #pragma once
  11. #include "PolyGlobals.h"
  12. #include <vector>
  13. #include <string>
  14. #include "OSBasics.h"
  15. #include "PolyTexture.h"
  16. #include "PolyCubemap.h"
  17. #include "PolyResource.h"
  18. #include "PolyCoreServices.h"
  19. #include "PolyModule.h"
  20. #include "tinyxml.h"
  21. #include "physfs.h"
  22. using std::vector;
  23. using std::string;
  24. namespace Polycode {
  25. class _PolyExport ResourceManager {
  26. public:
  27. ResourceManager();
  28. ~ResourceManager();
  29. void addResource(Resource *resource);
  30. void addDirResource(string dirPath, bool recursive);
  31. void addArchive(string zipPath);
  32. bool readFile(string fileName){ return false;}
  33. void parseTextures(string dirPath, bool recursive);
  34. void parseMaterials(string dirPath, bool recursive);
  35. void parseShaders(string dirPath, bool recursive);
  36. void parsePrograms(string dirPath, bool recursive);
  37. void parseCubemaps(string dirPath, bool recursive);
  38. Resource *getResource(int resourceType, string resourceName);
  39. void addShaderModule(PolycodeShaderModule *module);
  40. private:
  41. vector <Resource*> resources;
  42. vector <PolycodeShaderModule*> shaderModules;
  43. };
  44. }