All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DebugPrimitiveRenderable.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "DebugRenderableBase.h"
6 #include "Rendering.h"
7 #include "DynamicBuffer.h"
8 #include "AllVertexTypes.h"
9 #include "Types.h"
10 #include "VectorMath.h"
11 
12 namespace Eegeo
13 {
14  namespace DebugRendering
15  {
17  {
18  public:
19  DebugPrimitiveRenderable(int vertexBufferSize,
20  int indexBufferSize,
22  const Rendering::VertexLayouts::VertexBinding& vertexBinding);
23 
25 
26  void AddVertexElement(const Rendering::VertexTypes::ColoredVertex& vertexToAdd);
27  void AddIndexElement(const u16& indexToAdd);
28 
29  int GetCurrentVertexElementCount() const;
30 
31  bool ContainsMeshData() const;
32 
33  void Render(Rendering::GLState& glState) const;
34 
35  private:
36  void BindBuffers(Rendering::GLState& glState) const;
37 
39  Rendering::DynamicBuffer<u16>* m_pIndexBuffer;
40  const Rendering::VertexLayouts::VertexBinding& m_vertexBinding;
41  };
42  }
43 }