gdk-graphics  1b6d84e044c2c953fd7c9501e628a67e80f4da0d
webgl1es2_vertex_attribute.h
1 // © 2019 Joseph Cameron - All Rights Reserved
2 
3 #ifndef GDK_GFX_VERTEXATTRIBUTE_H
4 #define GDK_GFX_VERTEXATTRIBUTE_H
5 
6 #include <iosfwd>
7 #include <string>
8 
9 namespace gdk
10 {
15  // TODO: support more than just GLfloat.
16  // TODO: may have to break out into two siblings: interleaved attribute and noninterleaved? I am not sure. that may be more appropriately controlled at the format level. Need to whiteboard this.
18  {
19  using size_type = unsigned short;
20 
22  std::string name;
23 
25  size_type size = 0;
26 
28  bool operator==(const webgl1es2_vertex_attribute &) const;
30  bool operator!=(const webgl1es2_vertex_attribute &) const;
31 
36 
41 
43  webgl1es2_vertex_attribute(const std::string &aName, const unsigned short &aSize);
44  };
45 }
46 
47 #endif
Definition: camera.h:9
size_type size
number of components in the attribute. TODO: consider renaming to count? size is a bit confusing ...
Definition: webgl1es2_vertex_attribute.h:25
webgl1es2_vertex_attribute(const webgl1es2_vertex_attribute &)=default
copy semantics
std::string name
name of the vertex attribute, used to access its value within a programmable shader stage...
Definition: webgl1es2_vertex_attribute.h:22
bool operator==(const webgl1es2_vertex_attribute &) const
equality semantics
A vertex attribute is a component of a vertex. Typical definitions would include: position...
Definition: webgl1es2_vertex_attribute.h:17
bool operator!=(const webgl1es2_vertex_attribute &) const
equality semantics
webgl1es2_vertex_attribute & operator=(const webgl1es2_vertex_attribute &)=default
copy semantics