Ocular Engine
SubMesh.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_SUB_MESH__H__
19 #define __H__OCULAR_GRAPHICS_SUB_MESH__H__
20 
21 #include "Graphics/Mesh/VertexBuffer.hpp"
22 #include "Graphics/Mesh/IndexBuffer.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
38  class IndexBuffer;
39  class VertexBuffer;
40 
45  class SubMesh
46  {
47  public:
48 
49  SubMesh();
50  ~SubMesh();
51 
55  bool bind();
56 
60  void unbind();
61 
65  void unload();
66 
79  void setVertexBuffer(VertexBuffer* buffer);
80 
94 
103  void setIndexBuffer(IndexBuffer* buffer);
104 
112 
113  protected:
114 
115  VertexBuffer* m_VertexBuffer;
116  IndexBuffer* m_IndexBuffer;
117 
118  private:
119  };
120  }
124 }
129 //------------------------------------------------------------------------------------------
130 
131 #endif
bool bind()
Definition: SubMesh.cpp:45
Definition: VertexBuffer.hpp:78
void unload()
Definition: SubMesh.cpp:72
void setIndexBuffer(IndexBuffer *buffer)
Definition: SubMesh.cpp:102
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
void unbind()
Definition: SubMesh.cpp:59
VertexBuffer * getVertexBuffer()
Definition: SubMesh.cpp:97
Definition: IndexBuffer.hpp:77
void setVertexBuffer(VertexBuffer *buffer)
Definition: SubMesh.cpp:87
Combination of a VertexBuffer and IndexBuffer.
Definition: SubMesh.hpp:45
IndexBuffer * getIndexBuffer()
Definition: SubMesh.cpp:112