VPP  0.8
A high-level modern C++ API for Vulkan
vppCommandBufferRecorder.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 
79 {
80 public:
84  CommandBufferRecorder ( CommandBuffer buffer, std::uint32_t flags = 0 );
85 
90 
103  void render (
104  const RenderPass& hRenderPass,
105  const FrameBuffer& hFrameBuffer,
106  bool bAutoBindPipeline = true );
107 
114  void compute (
115  const ComputePass& hComputePass,
116  bool bAutoBindPipeline = true );
117 
134  void perform (
135  const Procedure& hProcedure );
136 
144  void presentImage ( VkImage hImage );
145 
154  void unpresentImage ( VkImage hImage );
155 };
156 
157 // -----------------------------------------------------------------------------
158 } // namespace vpp
159 // -----------------------------------------------------------------------------
Represents compute pass.
Definition: vppComputePass.hpp:139
void render(const RenderPass &hRenderPass, const FrameBuffer &hFrameBuffer, bool bAutoBindPipeline=true)
Generates commands for graphics rendering, for specified render pass and framebuffer.
~CommandBufferRecorder()
Finalizes the recorder.
The VPP namespace.
Definition: main.hpp:1
Represents a sequence of Vulkan commands.
Definition: vppCommandBuffer.hpp:68
Defines a vector of physical images to be used as targets for rendering attachments.
Definition: vppFramebuffer.hpp:86
void compute(const ComputePass &hComputePass, bool bAutoBindPipeline=true)
Generates commands for computation, for specified compute pass.
Represents Vulkan render pass.
Definition: vppRenderPass.hpp:40
void unpresentImage(VkImage hImage)
Generates commands for releasing a SwapChain image currently presented on screen. ...
Interface to the automatic command recording framework.
Definition: vppCommandBufferRecorder.hpp:78
void perform(const Procedure &hProcedure)
Generates commands for auxiliary processing, for specified compiled procedure.
void presentImage(VkImage hImage)
Generates commands for presentation of a SwapChain image on screen.
CommandBufferRecorder(CommandBuffer buffer, std::uint32_t flags=0)
Creates and initializes the recorder for given command buffer.
Definition: vppCompiledProcedures.hpp:45