made a lot of changes, to get the render pipeline working
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
#include "Scene.hpp"
|
||||
#include "BehaviourScripts/Camera.hpp"
|
||||
#include <algorithm>
|
||||
#include "Debug.hpp"
|
||||
|
||||
void TSE::Scene::Render(IRenderer &rnd, const IWindow &wnd)
|
||||
{
|
||||
auto camerasBackup = std::vector<Camera*>(IRenderer::camerasToRenderWith);
|
||||
int counter = 1;
|
||||
for(auto l : layers)
|
||||
{
|
||||
IRenderer::camerasToRenderWith.clear();
|
||||
if(!l.second->IsVisual()) continue;
|
||||
for(auto camera : camerasBackup)
|
||||
{
|
||||
auto it = std::find(camera->layersNotToRender.begin(), camera->layersNotToRender.end(), l.second->GetID());
|
||||
if(it == camera->layersNotToRender.end())
|
||||
{
|
||||
IRenderer::camerasToRenderWith.push_back(camera);
|
||||
}
|
||||
}
|
||||
|
||||
l.second->Render(rnd);
|
||||
if(counter++ != layers.size())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user