Graphics/FramePass: Add SetReadInput method
This commit is contained in:
@@ -61,10 +61,10 @@ namespace Nz
|
||||
inline void SetCommandCallback(CommandCallback callback);
|
||||
inline void SetClearColor(std::size_t outputIndex, const std::optional<Color>& color);
|
||||
inline void SetDepthStencilClear(float depth, UInt32 stencil);
|
||||
inline void SetExecutionCallback(ExecutionCallback callback);
|
||||
|
||||
inline void SetDepthStencilInput(std::size_t attachmentId);
|
||||
inline void SetDepthStencilOutput(std::size_t attachmentId);
|
||||
inline void SetExecutionCallback(ExecutionCallback callback);
|
||||
inline void SetReadInput(std::size_t inputIndex, bool doesRead);
|
||||
|
||||
FramePass& operator=(const FramePass&) = delete;
|
||||
FramePass& operator=(FramePass&&) noexcept = default;
|
||||
@@ -80,6 +80,7 @@ namespace Nz
|
||||
struct Input
|
||||
{
|
||||
std::size_t attachmentId;
|
||||
bool doesRead = true;
|
||||
};
|
||||
|
||||
struct Output
|
||||
|
||||
@@ -126,6 +126,12 @@ namespace Nz
|
||||
m_executionCallback = std::move(callback);
|
||||
}
|
||||
|
||||
inline void FramePass::SetReadInput(std::size_t inputIndex, bool doesRead)
|
||||
{
|
||||
assert(inputIndex < m_inputs.size());
|
||||
m_inputs[inputIndex].doesRead = doesRead;
|
||||
}
|
||||
|
||||
inline void FramePass::SetDepthStencilInput(std::size_t attachmentId)
|
||||
{
|
||||
m_depthStencilInput = attachmentId;
|
||||
|
||||
Reference in New Issue
Block a user