Some more optimization and fixed sorting of render job objects in RenderSystem

This commit is contained in:
Teejoon
2016-03-09 16:51:24 +01:00
parent d51bea798a
commit 91cad561a4
9 changed files with 372 additions and 137 deletions
+1 -1
View File
@@ -448,7 +448,7 @@ void RenderSystem::Update(double dt)
fillModels(scene.Jobs);
fillPointLights(scene.Jobs.PointLight, m_World);
//TODO: Make sure all objects needed are also sorted.
scene.Jobs.OpaqueObjects.sort();
scene.Jobs.OpaqueObjects.sort([](auto& a, auto& b) {return *a < *b; });
fillSprites(scene.Jobs.SpriteJob, m_World);
fillDirectionalLights(scene.Jobs.DirectionalLight, m_World);
fillText(scene.Jobs.Text, m_World);