Testing some event stuff
This commit is contained in:
@ -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) {
|
||||
|
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user