made a lot of changes, to get the render pipeline working

This commit is contained in:
2026-02-21 13:52:07 +01:00
parent 45501f153d
commit 769bbd4261
26 changed files with 546 additions and 150 deletions

View File

@@ -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())
{