Divide Framework
0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
DoFPreRenderOperator.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2018 DIVIDE-Studio
3
Copyright (c) 2009 Ionut Cava
4
5
This file is part of DIVIDE Framework.
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy
8
of this software
9
and associated documentation files (the "Software"), to deal in the Software
10
without restriction,
11
including without limitation the rights to use, copy, modify, merge, publish,
12
distribute, sublicense,
13
and/or sell copies of the Software, and to permit persons to whom the
14
Software is furnished to do so,
15
subject to the following conditions:
16
17
The above copyright notice and this permission notice shall be included in
18
all copies or substantial portions of the Software.
19
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
IMPLIED,
22
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23
PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25
DAMAGES OR OTHER LIABILITY,
26
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27
IN CONNECTION WITH THE SOFTWARE
28
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30
*/
31
32
#pragma once
33
#ifndef DVD_DOF_PRE_RENDER_OPERATOR_H_
34
#define DVD_DOF_PRE_RENDER_OPERATOR_H_
35
36
#include "
Rendering/Camera/Headers/Camera.h
"
37
#include "
Rendering/PostFX/Headers/PreRenderOperator.h
"
38
#include "
Platform/Video/Headers/PushConstants.h
"
39
40
namespace
Divide
{
41
42
class
DoFPreRenderOperator
final :
public
PreRenderOperator
{
43
public
:
44
explicit
DoFPreRenderOperator
(
GFXDevice
& context,
PreRenderBatch
&
parent
);
45
~DoFPreRenderOperator
();
46
47
[[nodiscard]]
bool
execute
(
PlayerIndex
idx,
const
CameraSnapshot
& cameraSnapshot,
const
RenderTargetHandle
& input,
const
RenderTargetHandle
& output,
GFX::CommandBuffer
& bufferInOut)
override
;
48
void
reshape
(
U16
width,
U16
height)
override
;
49
50
void
parametersChanged
()
noexcept
;
51
52
[[nodiscard]]
bool
ready
()
const
noexcept
override
;
53
54
private
:
55
Handle<ShaderProgram>
_dofShader
= INVALID_HANDLE<ShaderProgram>;
56
Pipeline
*
_pipeline
=
nullptr
;
57
PushConstantsStruct
_constants
{};
58
};
59
60
}
// namespace Divide
61
62
#endif
//DVD_DOF_PRE_RENDER_OPERATOR_H_
63
Camera.h
PreRenderOperator.h
PushConstants.h
Divide::DoFPreRenderOperator
Definition:
DoFPreRenderOperator.h:42
Divide::DoFPreRenderOperator::ready
bool ready() const noexcept override
Definition:
DoFPreRenderOperator.cpp:99
Divide::DoFPreRenderOperator::execute
bool execute(PlayerIndex idx, const CameraSnapshot &cameraSnapshot, const RenderTargetHandle &input, const RenderTargetHandle &output, GFX::CommandBuffer &bufferInOut) override
Return true if we rendered into "output".
Definition:
DoFPreRenderOperator.cpp:130
Divide::DoFPreRenderOperator::_constants
PushConstantsStruct _constants
Definition:
DoFPreRenderOperator.h:57
Divide::DoFPreRenderOperator::reshape
void reshape(U16 width, U16 height) override
Definition:
DoFPreRenderOperator.cpp:124
Divide::DoFPreRenderOperator::~DoFPreRenderOperator
~DoFPreRenderOperator()
Definition:
DoFPreRenderOperator.cpp:94
Divide::DoFPreRenderOperator::_pipeline
Pipeline * _pipeline
Definition:
DoFPreRenderOperator.h:56
Divide::DoFPreRenderOperator::parametersChanged
void parametersChanged() noexcept
Definition:
DoFPreRenderOperator.cpp:104
Divide::DoFPreRenderOperator::_dofShader
Handle< ShaderProgram > _dofShader
Definition:
DoFPreRenderOperator.h:55
Divide::GFX::CommandBuffer
Definition:
CommandBuffer.h:110
Divide::GFXDevice
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
Definition:
GFXDevice.h:215
Divide::Pipeline
Definition:
Pipeline.h:59
Divide::PreRenderBatch
Definition:
PreRenderBatch.h:83
Divide::PreRenderOperator
Definition:
PreRenderOperator.h:53
Divide
Handle console commands that start with a forward slash.
Definition:
AIProcessor.cpp:7
Divide::parent
Project & parent
Definition:
DefaultScene.h:41
Divide::U16
uint16_t U16
Definition:
PlatformDataTypes.h:45
Divide::PlayerIndex
U8 PlayerIndex
Definition:
PlatformDefines.h:153
Divide::CameraSnapshot
Definition:
CameraSnapshot.h:39
Divide::Handle
Definition:
PlatformDefines.h:519
Divide::PushConstantsStruct
Definition:
PushConstants.h:41
Divide::RenderTargetHandle
Definition:
RenderTarget.h:45
Source
Rendering
PostFX
CustomOperators
Headers
DoFPreRenderOperator.h
Generated on Fri May 17 2024 16:59:56 for Divide Framework by
1.9.6