Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
PreRenderOperator.h
Go to the documentation of this file.
1#pragma once
2#ifndef DVD_PRE_RENDER_OPERATOR_H_
3#define DVD_PRE_RENDER_OPERATOR_H_
4
7
8
9namespace Divide {
10struct Configuration;
11struct CameraSnapshot;
12
13class Quad3D;
14class Camera;
15class Texture;
16class Pipeline;
17class ShaderProgram;
18
19namespace GFX {
20 class CommandBuffer;
21};
22
23
24enum class RenderStage : U8;
25
26enum class FilterType : U16 {
38};
39
40enum class FilterSpace : U8 {
41 // HDR Space: operators that work AND MODIFY the HDR screen target (e.g. SSAO, SSR)
43 // HDR Space: operators that work on the HDR target (e.g. Bloom, DoF)
45 // LDR Space: operators that work on the post-tonemap target (e.g. Post-AA)
47 COUNT
48};
49
50class PreRenderBatch;
54 public:
60 virtual ~PreRenderOperator() = default;
61
63 virtual bool execute(PlayerIndex idx, const CameraSnapshot& cameraSnapshot, const RenderTargetHandle& input, const RenderTargetHandle& output, GFX::CommandBuffer& bufferInOut);
64
65 virtual void reshape(U16 width, U16 height);
66
67 virtual void prepare(PlayerIndex idx, GFX::CommandBuffer& bufferInOut);
68
69 [[nodiscard]] FilterType operatorType() const noexcept { return _operatorType; }
70
71 virtual void onToggle(bool state);
72
73 [[nodiscard]] virtual bool ready() const noexcept { return true; }
74
75 protected:
77
79 RTDrawDescriptor _screenOnlyDraw{};
80 FilterType _operatorType = FilterType::FILTER_COUNT;
81 bool _enabled = true;
82};
83
85
86}; // namespace Divide
87
88#endif //DVD_PRE_RENDER_OPERATOR_H_
#define FWD_DECLARE_MANAGED_CLASS(T)
#define NOINITVTABLE
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
Definition: GFXDevice.h:215
virtual bool ready() const noexcept
virtual ~PreRenderOperator()=default
FilterType operatorType() const noexcept
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
uint8_t U8
Project & parent
Definition: DefaultScene.h:41
uint16_t U16