VPP  0.7
A high-level modern C++ API for Vulkan
vppFramebuffer.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 
87 {
88 public:
90  FrameBuffer();
91 
98  FrameBuffer (
99  const std::vector< FrameImageView >& imageViews,
100  const RenderPass& hRenderPass );
101 
105  FrameBuffer (
106  const RenderPass& hRenderPass );
107 
109  VkFramebuffer handle() const;
110 
112  VkRect2D area() const;
113 
115  FrameImageView imageView ( size_t index ) const;
116 
118  size_t imageViewCount() const;
119 };
120 
121 // -----------------------------------------------------------------------------
122 } // namespace vpp
123 // -----------------------------------------------------------------------------
Untyped image view class. Useful for constructing FrameBuffer objects.
Definition: vppFrameImageView.hpp:46
VkFramebuffer handle() const
Retrieves the Vulkan handle.
The VPP namespace.
Definition: main.hpp:1
FrameBuffer()
Constructs null reference.
Defines a vector of physical images to be used as targets for rendering attachments.
Definition: vppFramebuffer.hpp:86
FrameImageView imageView(size_t index) const
Retrieves the view reference for specified image index.
Represents Vulkan render pass.
Definition: vppRenderPass.hpp:40
size_t imageViewCount() const
Retrieves the count of images.
VkRect2D area() const
Retrieves the size of the frame.