2
0

PolyResourceManager.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 "PolyString.h"
  12. #include "PolyGlobals.h"
  13. #include <vector>
  14. #include <string>
  15. #include "OSBasics.h"
  16. #include "PolyTexture.h"
  17. #include "PolyCubemap.h"
  18. #include "PolyResource.h"
  19. #include "PolyCoreServices.h"
  20. #include "PolyModule.h"
  21. #include "tinyxml.h"
  22. #include "physfs.h"
  23. using std::vector;
  24. using std::string;
  25. namespace Polycode {
  26. class _PolyExport ResourceManager {
  27. public:
  28. ResourceManager();
  29. ~ResourceManager();
  30. void addResource(Resource *resource);
  31. void addDirResource(String dirPath, bool recursive);
  32. void addArchive(String zipPath);
  33. bool readFile(String fileName){ return false;}
  34. void parseTextures(String dirPath, bool recursive);
  35. void parseMaterials(String dirPath, bool recursive);
  36. void parseShaders(String dirPath, bool recursive);
  37. void parsePrograms(String dirPath, bool recursive);
  38. void parseCubemaps(String dirPath, bool recursive);
  39. Resource *getResource(int resourceType, String resourceName);
  40. void addShaderModule(PolycodeShaderModule *module);
  41. private:
  42. vector <Resource*> resources;
  43. vector <PolycodeShaderModule*> shaderModules;
  44. };
  45. }