VPP  0.7
A high-level modern C++ API for Vulkan
vppRenderGraph.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 
190 class RenderGraph :
191  public NonRenderingCommands,
192  public UniversalCommands
193 {
194 public:
196  RenderGraph();
197 
199  ~RenderGraph();
200 
215  static void cmdDraw (
216  unsigned int vertexCount,
217  unsigned int instanceCount,
218  unsigned int firstVertex,
219  unsigned int firstInstance,
220  CommandBuffer hCmdBuffer = CommandBuffer() );
221 
241  static void cmdDrawIndexed (
242  unsigned int indexCount,
243  unsigned int instanceCount,
244  unsigned int firstIndex,
245  int vertexOffset,
246  unsigned int firstInstance,
247  CommandBuffer hCmdBuffer = CommandBuffer() );
248 
270  static void cmdDrawIndirect (
271  const IndirectBufferView& data,
272  VkDeviceSize offset,
273  unsigned int drawCount,
274  CommandBuffer hCmdBuffer = CommandBuffer() );
275 
301  static void cmdDrawIndexedIndirect (
302  const IndirectBufferView& data,
303  VkDeviceSize offset,
304  unsigned int drawCount,
305  CommandBuffer hCmdBuffer = CommandBuffer() );
306 
313  static void cmdClearImages (
314  unsigned int attachmentCount,
315  const VkClearAttachment* pAttachments,
316  unsigned int rectCount,
317  const VkClearRect* pRects,
318  CommandBuffer hCmdBuffer = CommandBuffer() );
319 };
320 
321 // -----------------------------------------------------------------------------
322 } // namespace vpp
323 // -----------------------------------------------------------------------------
Set of commands that may be used anywhere (inside or outside rendering context).
Definition: vppCommands.hpp:335
The VPP namespace.
Definition: main.hpp:1
Set of commands that may be used outside rendering context.
Definition: vppCommands.hpp:52
Represents a sequence of Vulkan commands.
Definition: vppCommandBuffer.hpp:68
static void cmdDraw(unsigned int vertexCount, unsigned int instanceCount, unsigned int firstVertex, unsigned int firstInstance, CommandBuffer hCmdBuffer=CommandBuffer())
Generates a command to draw specified region of vertex/instance buffers.
RenderGraph()
Constructs null reference.
Definition: vppBufferView.hpp:162
static void cmdDrawIndexedIndirect(const IndirectBufferView &data, VkDeviceSize offset, unsigned int drawCount, CommandBuffer hCmdBuffer=CommandBuffer())
Generates a command to draw specified region of indirect drawing buffer, also using an index buffer t...
Base class for render graphs.
Definition: vppRenderGraph.hpp:190
~RenderGraph()
Decreases reference count.
static void cmdDrawIndirect(const IndirectBufferView &data, VkDeviceSize offset, unsigned int drawCount, CommandBuffer hCmdBuffer=CommandBuffer())
Generates a command to draw specified region of indirect drawing buffer.
static void cmdDrawIndexed(unsigned int indexCount, unsigned int instanceCount, unsigned int firstIndex, int vertexOffset, unsigned int firstInstance, CommandBuffer hCmdBuffer=CommandBuffer())
Generates a command to draw specified region of vertex/instance buffers, using additional index buffe...
static void cmdClearImages(unsigned int attachmentCount, const VkClearAttachment *pAttachments, unsigned int rectCount, const VkClearRect *pRects, CommandBuffer hCmdBuffer=CommandBuffer())
Generates a command to clear specified attachment images.