VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
AttributeSet.h
1 /*
2  * Copyright (C) 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ATTRIBUTESET_H
18 #define ATTRIBUTESET_H
19 
20 #include "Attribute.h"
21 #include "RendererCommon.h"
22 #include <initializer_list>
23 #include <vector>
24 
36 struct AttributeSet {
40  std::vector<Attribute> attributes;
46  int vertexStride = 0;
52  std::vector<int> attributeOffsets;
53 
57  AttributeSet();
64  explicit AttributeSet(std::initializer_list<Attribute> list);
71  explicit AttributeSet(const std::vector<Attribute>& list);
72 
77 };
78 
79 #endif // ATTRIBUTESET_H
void computeAttributeOffsets()
Computes and fills in this attribute set's attribute offsets and vertex stride.
Header declaring and including types common to renderer classes such as Vector2. Also includes GL hea...
AttributeSet()
Constructs an empty attribute set.
int vertexStride
Number of bytes between vertices.
Definition: AttributeSet.h:46
std::vector< int > attributeOffsets
Number of bytes from the beginning of a vertex for each attribute.
Definition: AttributeSet.h:52
A list of vertex attributes.
Definition: AttributeSet.h:36
std::vector< Attribute > attributes
List of attribute definitions.
Definition: AttributeSet.h:40