All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MeshFactory.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 "VectorMathDecl.h"
8 #include <string>
9 
10 namespace Eegeo
11 {
12  namespace Rendering
13  {
14  namespace MeshFactories
15  {
19  class MeshFactory : protected Eegeo::NonCopyable
20  {
21  public:
22  Mesh* CreateMesh(
23  const void* pVertexData,
24  int numOfVertices,
25  const void* pIndexData,
26  size_t indexDataSize,
27  u32 numOfIndices,
28  const std::string& debugName
29  ) const;
30 
31  virtual ~MeshFactory() {}
32 
33  protected:
34  MeshFactory(Rendering::GlBufferPool& glBufferPool, const VertexLayouts::VertexLayout& vertexLayout, const size_t vertexSize)
35  : m_glBufferPool(glBufferPool)
36  , m_vertexLayout(vertexLayout)
37  , m_vertexSize(vertexSize)
38  {
39  }
40 
41  Rendering::GlBufferPool& m_glBufferPool;
42  const VertexLayouts::VertexLayout& m_vertexLayout;
43  size_t m_vertexSize;
44  };
45  }
46  }
47 }