VPP  0.8
A high-level modern C++ API for Vulkan
vppRenderPass.hpp
1 /*
2  Copyright 2016-2018 SOFT-ERG, Przemek Kuczmierczyk (www.softerg.com)
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without modification,
6  are permitted provided that the following conditions are met:
7 
8  1. Redistributions of source code must retain the above copyright notice,
9  this list of conditions and the following disclaimer.
10 
11  2. Redistributions in binary form must reproduce the above copyright notice,
12  this list of conditions and the following disclaimer in the documentation
13  and/or other materials provided with the distribution.
14 
15  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
22  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26 
27 // -----------------------------------------------------------------------------
28 namespace vpp {
29 // -----------------------------------------------------------------------------
30 
41 {
42 public:
44  RenderPass (
45  const RenderGraph& renderGraph,
46  const Device& hDevice );
47 
49  RenderPass (
50  const RenderGraph& renderGraph,
51  const Device& hDevice,
52  const PipelineCache& hPipelineCache );
53 
55  VkRenderPass handle() const;
56 
58  RenderGraph& graph() const;
59 
61  const Device& device() const;
62 
64  const PipelineCache& pipelineCache() const;
65 
69  const Pipeline& pipeline ( unsigned int iProcess, unsigned int iPipeline ) const;
70 
74  const Pipeline& pipeline ( const Process& hProcess, unsigned int iPipeline ) const;
75 
79  unsigned int addPipeline (
80  unsigned int iProcess,
81  const PipelineLayoutBase& layout,
82  const RenderingOptions& options );
83 
87  unsigned int addPipeline (
88  const Process& hProcess,
89  const PipelineLayoutBase& layout,
90  const RenderingOptions& options );
91 
96  void beginRendering();
97 
102  void endRendering();
103 };
104 
105 // -----------------------------------------------------------------------------
106 } // namespace vpp
107 // -----------------------------------------------------------------------------
Represents logical rendering device.
Definition: vppDevice.hpp:49
RenderPass(const RenderGraph &renderGraph, const Device &hDevice)
Construct a render pass from given render graph.
unsigned int addPipeline(unsigned int iProcess, const PipelineLayoutBase &layout, const RenderingOptions &options)
Registers a pipeline with this render pass and associates it with specified process and rendering opt...
Definition: vppPipelineCache.hpp:31
const PipelineCache & pipelineCache() const
Retrieves the pipeline cache associated with this render pass.
Compiled pipeline class for graphics pipelines.
Definition: vppPipeline.hpp:48
The VPP namespace.
Definition: main.hpp:1
void endRendering()
Call after finishing manually recording commands for this render pass. The CommandBufferRecorder clas...
Represents process graph node.
Definition: vppRenderGraphNodes.hpp:231
RenderGraph & graph() const
Retrieves render graph associated with this render pass.
Represents Vulkan render pass.
Definition: vppRenderPass.hpp:40
Base class for render graphs.
Definition: vppRenderGraph.hpp:190
const Pipeline & pipeline(unsigned int iProcess, unsigned int iPipeline) const
Retrieves a pipeline associated with this render pass, specified process and pipeline index...
void beginRendering()
Call before manually recording commands for this render pass. The CommandBufferRecorder class calls t...
A container for various rendering parameters.
Definition: vppRenderingOptions.hpp:39
VkRenderPass handle() const
Retrieves Vulkan handle to the render pass.
const Device & device() const
Retrieves the device associated with this render pass.