Ocular Engine
IndexBuffer.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_INDEX_BUFFER__H__
19 #define __H__OCULAR_GRAPHICS_INDEX_BUFFER__H__
20 
21 #include <cstdint>
22 #include <vector>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
78  {
79  public:
80 
81  IndexBuffer();
82  virtual ~IndexBuffer();
83 
93  virtual bool build();
94 
101  virtual void bind();
102 
110  virtual void unbind();
111 
118  virtual void addIndex(uint32_t index);
119 
126  virtual void addIndices(std::vector<uint32_t> const& indices);
127 
135  virtual void addIndices(std::vector<uint32_t> const& indices, uint32_t count);
136 
144  virtual void addIndices(uint32_t const* indices, uint32_t count);
145 
150  uint32_t getIndex(uint32_t index);
151 
155  std::vector<uint32_t> const& getIndices() const;
156 
160  uint32_t getNumIndices() const;
161 
162  protected:
163 
164  std::vector<uint32_t> m_Indices;
165 
166  private:
167  };
168  }
172 }
177 //------------------------------------------------------------------------------------------
178 
179 #endif
virtual void addIndex(uint32_t index)
Definition: IndexBuffer.cpp:59
virtual void addIndices(std::vector< uint32_t > const &indices)
Definition: IndexBuffer.cpp:64
virtual void bind()
Definition: IndexBuffer.cpp:49
uint32_t getIndex(uint32_t index)
Definition: IndexBuffer.cpp:86
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
uint32_t getNumIndices() const
Definition: IndexBuffer.cpp:107
std::vector< uint32_t > const & getIndices() const
Definition: IndexBuffer.cpp:102
virtual void unbind()
Definition: IndexBuffer.cpp:54
Definition: IndexBuffer.hpp:77
virtual bool build()
Definition: IndexBuffer.cpp:44