All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
VertexAttribs.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Rendering.h"
7 #include "VertexSemantics.h"
8 #include "VertexAttribElement.h"
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace Rendering
14  {
15  namespace VertexLayouts
16  {
17 
22  {
23  public:
24  VertexAttribs();
25 
26  void AddElement(const VertexAttribElement& element);
27 
28  bool UsesSemantic(const VertexSemanticId::IdValues semantic) const;
29 
30  VertexSemanticFlags::FlagValues GetSemanticFlags() const;
31 
32  int GetNumOfElements() const;
33 
34  const VertexAttribElement& GetElement(int elementIndex) const;
35 
36  void DetectShaderAttributes(GLuint programHandle);
37 
38  private:
39  VertexSemanticId::IdValues NameToSemantic(const std::string& name) const;
40 
41  VertexSemanticFlags::FlagValues m_semanticFlags;
42  std::vector<VertexAttribElement> m_elements;
43  };
44  }
45  }
46 }