instanced structure in place
This commit is contained in:
parent
8f0a0464a5
commit
5aeac78f60
|
@ -155,8 +155,6 @@ namespace Oyster
|
||||||
m->GlowTint = Math::Float3(1);
|
m->GlowTint = Math::Float3(1);
|
||||||
m->info = (Model::ModelInfo*)Core::loader.LoadResource((Core::modelPath + filename).c_str(),Oyster::Graphics::Loading::LoadDAN, Oyster::Graphics::Loading::UnloadDAN);
|
m->info = (Model::ModelInfo*)Core::loader.LoadResource((Core::modelPath + filename).c_str(),Oyster::Graphics::Loading::LoadDAN, Oyster::Graphics::Loading::UnloadDAN);
|
||||||
|
|
||||||
Core::loader
|
|
||||||
|
|
||||||
Model::ModelInfo* mi = (Model::ModelInfo*)m->info;
|
Model::ModelInfo* mi = (Model::ModelInfo*)m->info;
|
||||||
if(!mi || mi->Vertices->GetBufferPointer() == NULL)
|
if(!mi || mi->Vertices->GetBufferPointer() == NULL)
|
||||||
{
|
{
|
||||||
|
@ -166,6 +164,15 @@ namespace Oyster
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Core::loader.GetResourceCount(m->info) == 1)
|
||||||
|
{
|
||||||
|
Render::Resources::RenderData[m->info] = new Render::Resources::ModelDataWrapper();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Render::Resources::RenderData[m->info]->Models++;
|
||||||
|
}
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue