Optimisations

Former-commit-id: 81d277a49b57f061a6339678bd953054e434c613
This commit is contained in:
Lynix
2013-07-03 01:17:22 +02:00
parent 3c1c04b2aa
commit b035852576
14 changed files with 179 additions and 173 deletions

View File

@@ -124,15 +124,17 @@ void NzForwardRenderQueue::AddModel(const NzModel* model)
}
}
void NzForwardRenderQueue::Clear()
void NzForwardRenderQueue::Clear(bool fully)
{
directionnalLights.clear();
otherDrawables.clear();
visibleLights.clear();
visibleModels.clear();
visibleTransparentsModels.clear();
transparentSkeletalModels.clear();
transparentStaticModels.clear();
if (fully)
visibleModels.clear();
}
void NzForwardRenderQueue::Sort(const NzCamera& camera)
@@ -164,6 +166,11 @@ void NzForwardRenderQueue::Sort(const NzCamera& camera)
std::sort(visibleTransparentsModels.begin(), visibleTransparentsModels.end(), comparator);
}
void NzForwardRenderQueue::OnResourceDestroy(const NzResource* resource, int index)
{
}
bool NzForwardRenderQueue::SkeletalMeshComparator::operator()(const NzSkeletalMesh* subMesh1, const NzSkeletalMesh* subMesh2)
{
const NzIndexBuffer* iBuffer1 = subMesh1->GetIndexBuffer();