VPP  0.7
A high-level modern C++ API for Vulkan
vppLangIntBase.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 
185 template< class SingleT >
186 class arrayOf
187 {
188 public:
201  typedef <implementation_defined> return_type;
202 
216  arrayOf (
217  unsigned int count,
218  unsigned int set = 0,
219  int binding = -1 );
220 
238  arrayOf (
239  const std::vector< NormalizedSampler >& samplers,
240  unsigned int count,
241  unsigned int set = 0,
242  int binding = -1 );
243 
261  arrayOf (
262  const std::vector< UnnormalizedSampler >& samplers,
263  unsigned int count,
264  unsigned int set = 0,
265  int binding = -1 );
266 
267  auto operator= ( const multi_value_type& value );
268 
280  return_type operator[]( const Int& index ) const;
281 
283  return_type operator[]( const UInt& index ) const;
284 
286  return_type operator[]( int index ) const;
287 
289  return_type operator[]( unsigned int index ) const;
290 };
291 
292 // -----------------------------------------------------------------------------
293 } // namespace vpp
294 // -----------------------------------------------------------------------------
Shader (GPU-side) data type for 32-bit unsigned integer values.
Definition: vppLangScalarTypes.hpp:249
The VPP namespace.
Definition: main.hpp:1
typedef< implementation_defined > return_type
Type of accessed image resource.
Definition: vppLangIntBase.hpp:201
return_type operator[](const Int &index) const
Indexing operator for accessing individual binding points in the array.
Shader (GPU-side) data type for 32-bit signed integer values.
Definition: vppLangScalarTypes.hpp:167
arrayOf(unsigned int count, unsigned int set=0, int binding=-1)
Constructs array of binding points.
Template allowing to construct arrays of binding points.
Definition: vppLangIntBase.hpp:186