Revision 2948,
1.4 KB
checked in by mattausch, 16 years ago
(diff) |
depth pass for shadows not working at all
|
Line | |
---|
1 | #ifndef __ResourceManager_H__
|
---|
2 | #define __ResourceManager_H__
|
---|
3 |
|
---|
4 |
|
---|
5 | #include <string>
|
---|
6 | #include <iostream>
|
---|
7 | #include <fstream>
|
---|
8 | #include <map>
|
---|
9 | #include "common.h"
|
---|
10 |
|
---|
11 |
|
---|
12 | class igzstream;
|
---|
13 |
|
---|
14 |
|
---|
15 | namespace CHCDemoEngine
|
---|
16 | {
|
---|
17 |
|
---|
18 | class SceneEntity;
|
---|
19 | class Material;
|
---|
20 | class Geometry;
|
---|
21 | class Texture;
|
---|
22 | class Matrix4x4;
|
---|
23 | class Transform3;
|
---|
24 |
|
---|
25 |
|
---|
26 | /** Loads a scene and also handles the cleanup
|
---|
27 | */
|
---|
28 | class ResourceManager
|
---|
29 | {
|
---|
30 | public:
|
---|
31 |
|
---|
32 | ~ResourceManager();
|
---|
33 | /** Loads a model
|
---|
34 | */
|
---|
35 | bool Load(const std::string &filename, SceneEntityContainer &geometry);
|
---|
36 |
|
---|
37 | int GetNumEntities() const { return (int)mSceneEntities.size(); }
|
---|
38 |
|
---|
39 | protected:
|
---|
40 |
|
---|
41 | void LoadTextures(igzstream &str);
|
---|
42 | void LoadShapes(igzstream &str);
|
---|
43 | void LoadSceneEntities(igzstream &str, SceneEntityContainer &entities);
|
---|
44 |
|
---|
45 | SceneEntity *LoadSceneEntity(igzstream &str);
|
---|
46 | Material *LoadMaterial(igzstream &str);
|
---|
47 | Geometry *LoadGeometry(igzstream &str);
|
---|
48 |
|
---|
49 | std::map<int, Texture *> mTextureTable;
|
---|
50 | std::map<int, Material *> mMaterialTable;
|
---|
51 | std::map<int, Geometry *> mGeometryTable;
|
---|
52 | //std::map<int, Shape *> mShapesTable;
|
---|
53 |
|
---|
54 | // these are kept to be able to delete these resources afterwards
|
---|
55 | std::vector<Texture *> mTextures;
|
---|
56 | std::vector<Material *> mMaterials;
|
---|
57 | std::vector<Geometry *> mGeometry;
|
---|
58 | std::vector<Transform3 *> mTrafos;
|
---|
59 |
|
---|
60 | ShapeContainer mShapes;
|
---|
61 |
|
---|
62 | ////////
|
---|
63 |
|
---|
64 | /// the scene entities
|
---|
65 | SceneEntityContainer mSceneEntities;
|
---|
66 | };
|
---|
67 |
|
---|
68 | }
|
---|
69 | #endif
|
---|
Note: See
TracBrowser
for help on using the repository browser.