Implemented KRBundle's

Implementation of logic to allow dynamic loading and unloading of meshes and models for scenes larger than RAM in progress

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4090
This commit is contained in:
kearwood
2012-09-11 03:06:35 +00:00
parent c7b7c20310
commit 34c7dc7b53
57 changed files with 1841 additions and 1089 deletions

View File

@@ -32,8 +32,11 @@
#ifndef KRMODELMANAGER_H
#define KRMODELMANAGER_H
#define KRENGINE_MAX_VBO_HANDLES 50
#import "KREngine-common.h"
#import "KRContextObject.h"
#import "KRDataBlock.h"
class KRContext;
class KRModel;
@@ -47,15 +50,30 @@ public:
KRModelManager(KRContext &context);
virtual ~KRModelManager();
KRModel *loadModel(const char *szName, const char *szPath);
KRModel *loadModel(const char *szName, KRDataBlock *pData);
KRModel *getModel(const char *szName);
KRModel *getFirstModel();
std::vector<std::string> getModelNames();
std::map<std::string, KRModel *> getModels();
void bindVBO(const GLvoid *data, GLsizeiptr size);
private:
std::map<std::string, KRModel *> m_models;
typedef struct vbo_info {
GLuint handle;
GLsizeiptr size;
const GLvoid *data;
} vbo_info_type;
vbo_info_type m_currentVBO;
std::map<const GLvoid *, vbo_info_type> m_vbos;
};
#endif