My Project
VertexDeclarationOpenGL.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  struct VertexElement
6  {
7  //VertexElement();
8 
9  bool IsEndDeclare() const;
10  uint32 GetSize() const;
11  public:
12  WORD Stream; // Stream index
13  WORD Offset; // Offset in the stream in bytes
14  BYTE Type; // Data type
15  BYTE Method; // Processing method
16  BYTE Usage; // Semantics
17  BYTE UsageIndex; // Semantic index
18  };
19 
22  {
23  public:
25  CVertexDeclaration(const VertexElement* elems);
26  virtual ~CVertexDeclaration();
27  public:
28  virtual void Release();
29 
30  void ApplyAttribute(const void* pVertexStreamZeroData = 0);
31  void EnableAttribute();
32 
34  void SetVertexElement(const VertexElement* elems);
35 
36  protected:
37  std::vector<VertexElement> m_elements;
38  uint32 m_nSize;
39  uint32 m_dwAttributes;
40  //use opengl vertext array object (vao) if possible, same concept as vertex declaration in directX
41  GLuint m_vao;
42  };
43 }
44 
different physics engine has different winding order.
Definition: EventBinding.h:32
vertex element
Definition: VertexDeclarationOpenGL.h:21
Definition: VertexDeclarationOpenGL.h:5