Skip to content

Commit

Permalink
Implement Settings To Control Rendering (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed Jun 23, 2022
1 parent d302144 commit d90f7ca
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Source/Core/Loader/ERS_SceneLoader/ERS_SceneLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,23 @@ void ERS_CLASS_SceneLoader::AddModel(ERS_STRUCT_Scene* Scene, long AssetID) {
Scene->Models[CurrentSize-1]->Name = std::string("Loading...");
Scene->Models[CurrentSize-1]->FlipTextures = true;


// Process Texture References, Setup Meshes
ERS_STRUCT_Model* Model = Scene->Models[CurrentSize-1].get();
for (unsigned long i = 0; i < Model->Meshes.size(); i++) {
for (unsigned long Index = 0; Index < Model->Meshes[i].TextureReferences_.size(); Index++) { // IF TEXTURES DONT WORK, CHECK HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

int TextureIndex = Model->Meshes[i].TextureReferences_[Index];

// Set Shadow Configuration Pointers
Model->Meshes[i].CastDynamicShadows_ = &Model->CastDynamicShadows_;
Model->Meshes[i].CastStaticShadows_ = &Model->CastStaticShadows_;
Model->Meshes[i].ReceiveShadows_ = &Model->ReceiveShadows_;

}
}


ModelLoader_->AddModelToLoadingQueue(AssetID, Scene->Models[CurrentSize-1], Scene->Models[CurrentSize-1]->FlipTextures);


Expand Down

0 comments on commit d90f7ca

Please sign in to comment.