VPP  0.8
A high-level modern C++ API for Vulkan
vppFrameImageView.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 
47 {
48 public:
51 
60  explicit FrameImageView ( const Img& hImage, std::uint32_t layer = 0 );
61 
67  FrameImageView ( const Img& hImage, const VkImageSubresourceRange& sr );
68 
74  FrameImageView ( const SImageInfo& imageInfo, const Device& hDevice );
75 
82  template< class MemoryT, class ResourceT >
85  std::uint32_t layer = 0 );
86 
88  operator VkImageView() const;
89 
91  const Img& image() const;
92 
94  const Device& device() const;
95 };
96 
97 // -----------------------------------------------------------------------------
98 } // namespace vpp
99 // -----------------------------------------------------------------------------
Represents logical rendering device.
Definition: vppDevice.hpp:49
Class representing generic (untyped) Vulkan image.
Definition: vppImage.hpp:54
Untyped image view class. Useful for constructing FrameBuffer objects.
Definition: vppFrameImageView.hpp:46
The VPP namespace.
Definition: main.hpp:1
A compound object containing references to a buffer and memory bound to it.
Definition: vppDeviceMemory.hpp:137
const Device & device() const
Retrieves the device.
FrameImageView()
Constructs null reference.
const Img & image() const
Retrieves the image.