-
Notifications
You must be signed in to change notification settings - Fork 0
/
StaticObjectPool.hpp
40 lines (37 loc) · 1.23 KB
/
StaticObjectPool.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include <unordered_map>
#include <memory>
#include <vector>
#include <string>
namespace akj{
class cVertexArray;
class cGLShader;
class cGLArrayBuffer;
class cGLStaticObjectBuffer;
}
class cDrawableObject;
class iDrawable;
class tTextureList;
class cMeshPool;
class cTexturePool;
class cShaderPool;
class cPlayer;
class cLightManager;
class cObjectPool
{
public:
cObjectPool(const cMeshPool& mesh_pool, const cShaderPool& shader_pool, const cTexturePool& texture_pool);
~cObjectPool(void);
void CreateDrawnObject( const char* object_name, const char* mesh_name, const char* shader_name, const char* texture_base_name, std::vector<std::string>& suffixes);
void CreateDrawnObject(const char* object_name, const char* mesh_name, const char* shader_name, const char* texture_base_name);
void PopulateDrawables(std::vector<iDrawable*>& drawables);
cDrawableObject* GetDrawableObject( const char* texture_name ) const;
void SetPlayer( cPlayer* player );
void SetLightManager( cLightManager* lighting);
private:
const cMeshPool& mMeshPool;
const cShaderPool& mShaderPool;
const cTexturePool& mTexturePool;
std::unique_ptr<akj::cGLStaticObjectBuffer> mVBO;
std::unordered_map<std::string, std::unique_ptr<cDrawableObject> > mObjects;
};