VPP  0.7
A high-level modern C++ API for Vulkan
vppLangIntVertex.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 
75 template< ETag TAG, template< vpp::ETag TAG > class TDef >
77 {
78 };
79 
80 // -----------------------------------------------------------------------------
81 
120 template< ETag TAG, template< vpp::ETag TAG > class TDef >
122 {
123 };
124 
125 // -----------------------------------------------------------------------------
126 
172 template< ETag TAG, typename C1, typename C2 = no_component, typename C3 = no_component,
173  typename C4 = no_component, typename C5 = no_component >
174 struct Attribute
175 {
176  typedef format< C1, C2, C3, C4, C5 > format_type;
177  typedef <implementation_defined> rvalue_type;
178 
180  Attribute();
181 
183  operator rvalue_type();
184 };
185 
186 // -----------------------------------------------------------------------------
278 template< template< vpp::ETag TAG > class TDef >
280 {
347  auto operator= ( const VertexBufferView& hVertexBufferView );
348 
390  template< typename MemberT >
391  auto operator[]( MemberT YourDefinition::* pMember ) const;
392 };
393 
394 // -----------------------------------------------------------------------------
395 } // namespace vpp
396 // -----------------------------------------------------------------------------
Buffer view for vertex buffers.
Definition: vppBufferView.hpp:99
The VPP namespace.
Definition: main.hpp:1
ETag
Enumeration type allowing to select the flavor of shader structural type: the CPU or GPU version...
Definition: vppLangAggregates.hpp:42
Template for defining vertex or instance data fields.
Definition: vppLangIntVertex.hpp:174
auto operator=(const VertexBufferView &hVertexBufferView)
CPU-side binding operator. Use to bind actual data buffer to the binding point.
Base class for instance data structures.
Definition: vppLangIntVertex.hpp:121
Base class for vertex data structures.
Definition: vppLangIntVertex.hpp:76
Attribute()
Constructor - does not take any arguments.
Binding point class for vertex and instance input to shaders. Place in your pipeline configuration cl...
Definition: vppLangIntVertex.hpp:279
auto operator[](MemberT YourDefinition::*pMember) const
GPU-side access operator. Use to read a field (Attribute) in the shader.