Testing some event stuff

This commit is contained in:
2023-11-17 22:40:08 -06:00
parent 0c46c328fa
commit 26b5ec2c7f
20 changed files with 260 additions and 30 deletions

View File

@ -44,13 +44,13 @@ void RenderPipeline::renderScene(
for(auto camera : cameras) {
auto rt = camera->getRenderTarget();
// Is this camera the backbuffer camera?
if(rt == backBuffer || rt == nullptr) {
if(rt == backBuffer) {
backbufferCamera = camera;
continue;
}
// Render scene with this camera
renderSceneCamera(game, scene, camera, camera->getRenderTarget());
renderSceneCamera(game, scene, camera, rt);
}
if(backbufferCamera) {

View File

@ -4,7 +4,7 @@
// https://opensource.org/licenses/MIT
#pragma once
#include "dawnlibs.hpp"
#include "event/Event.hpp"
#define RENDER_TARGET_CLEAR_COLOR 1 << 0
#define RENDER_TARGET_CLEAR_DEPTH 1 << 1
@ -12,6 +12,8 @@
namespace Dawn {
class RenderTarget {
public:
Event<float_t, float_t> onResize;
/**
* Return the width of the render target.
*