Start to abstract model

This commit is contained in:
Will
2013-12-05 16:17:41 +01:00
parent bf1c7df8bb
commit 6afadafa1e
22 changed files with 123 additions and 126 deletions

View File

@@ -196,9 +196,8 @@ Texture2D * Renderer::getNewTexture2D() {
return newTexture;
}
Model * Renderer::getNewModel() {
Model *newModel = modelManager->newModel();
return newModel;
Model * Renderer::newModel(ResourceScope rs,const string &path,bool deletePixMapAfterLoad,std::map<string,vector<pair<string, string> > > *loadedFileList, string *sourceLoader) {
return modelManager->newModel(path,deletePixMapAfterLoad,loadedFileList,sourceLoader);
}
void Renderer::init() {
@@ -416,13 +415,6 @@ void Renderer::toggleGrid() {
grid= grid? false: true;
}
void Renderer::loadTheModel(Model *model, string file) {
model->setTextureManager(textureManager);
model->loadG3d(file);
textureManager->init();
modelManager->init();
}
void Renderer::renderTheModel(Model *model, float f) {
if(model != NULL){
modelRenderer->begin(true, true, !wireframe, false, &meshCallbackTeamColor);