Files
WickedEngine/WickedEngine/wiRenderPath.h
T
Turánszki János 74cb74d3c9 version 0.60 (#367)
- namespace refactor (example: wiGraphics:: -> wi::graphics)
  - provided namespace compatibility macro for old user code: WICKEDENGINE_BACKWARDS_COMPATIBILITY_0_59
- resource manager will return `Resource` instead of `shared_ptr<Resource>` objects
- MAD shader optimizations
- implemented alpha to coverage with alpha tested materials when MSAA is enabled
- alpha testing fix with transparent shadow maps
- TLAS and scene buffers will be recreated less frequently when things get added/removed from the scene
2021-12-03 21:22:27 +01:00

44 lines
1.3 KiB
C++

#pragma once
#include "CommonInclude.h"
#include "wiGraphicsDevice.h"
#include "wiCanvas.h"
namespace wi
{
class RenderPath : public wi::Canvas
{
private:
uint32_t layerMask = 0xFFFFFFFF;
public:
virtual ~RenderPath() = default;
// load resources in background (for example behind loading screen)
virtual void Load() {}
// called when RenderPath gets activated
virtual void Start() {}
// called when RenderPath gets deactivated (for example when switching to an other RenderPath)
virtual void Stop() {}
// executed before Update()
virtual void PreUpdate() {}
// update with fixed frequency
virtual void FixedUpdate() {}
// update once per frame
// dt : elapsed time since last call in seconds
virtual void Update(float dt) {}
// executed after Update()
virtual void PostUpdate() {}
// Render to layers, rendertargets, etc
// This will be rendered offscreen
virtual void Render() const {}
// Compose the rendered layers (for example blend the layers together as Images)
// This will be rendered to the backbuffer
virtual void Compose(wi::graphics::CommandList cmd) const {}
inline uint32_t getLayerMask() const { return layerMask; }
inline void setlayerMask(uint32_t value) { layerMask = value; }
wi::graphics::ColorSpace colorspace = wi::graphics::ColorSpace::SRGB;
};
}