-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRenderPath.h
41 lines (36 loc) · 1.26 KB
/
RenderPath.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "CommonInclude.h"
#include "wiGraphicsDevice.h"
#include "wiCanvas.h"
class RenderPath : public wiCanvas
{
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() {}
virtual void StorePreviousLeft() {}
virtual void StorePreviousRight() {}
// 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( int mode ) const {}
// Compose the rendered layers (for example blend the layers together as Images)
// This will be rendered to the backbuffer
virtual void Compose(wiGraphics::CommandList cmd) const {}
inline uint32_t getLayerMask() const { return layerMask; }
inline void setlayerMask(uint32_t value) { layerMask = value; }
};