Browse Source

Add inline to more functions

master
Riyyi 4 years ago
parent
commit
acd6a229df
  1. 12
      inferno/src/inferno/render/buffer.h

12
inferno/src/inferno/render/buffer.h

@ -67,10 +67,10 @@ namespace Inferno {
inline uint32_t getStride() const { return m_stride; } inline uint32_t getStride() const { return m_stride; }
// Iterators // Iterators
std::vector<BufferElement>::iterator begin() { return m_elements.begin(); } inline std::vector<BufferElement>::iterator begin() { return m_elements.begin(); }
std::vector<BufferElement>::iterator end() { return m_elements.end(); } inline std::vector<BufferElement>::iterator end() { return m_elements.end(); }
std::vector<BufferElement>::const_iterator begin() const { return m_elements.begin(); } inline std::vector<BufferElement>::const_iterator begin() const { return m_elements.begin(); }
std::vector<BufferElement>::const_iterator end() const { return m_elements.end(); } inline std::vector<BufferElement>::const_iterator end() const { return m_elements.end(); }
protected: protected:
void calculateOffsetsAndStride(); void calculateOffsetsAndStride();
@ -135,8 +135,8 @@ namespace Inferno {
void addVertexBuffer(const std::shared_ptr<VertexBuffer>& vertexBuffer); void addVertexBuffer(const std::shared_ptr<VertexBuffer>& vertexBuffer);
void setIndexBuffer(const std::shared_ptr<IndexBuffer>& indexBuffer); void setIndexBuffer(const std::shared_ptr<IndexBuffer>& indexBuffer);
const std::vector<std::shared_ptr<VertexBuffer>>& getVertexBuffers() const { return m_vertexBuffers; } inline const std::vector<std::shared_ptr<VertexBuffer>>& getVertexBuffers() const { return m_vertexBuffers; }
const std::shared_ptr<IndexBuffer>& getIndexBuffer() const { return m_indexBuffer; } inline const std::shared_ptr<IndexBuffer>& getIndexBuffer() const { return m_indexBuffer; }
private: private:
uint32_t m_id; uint32_t m_id;

Loading…
Cancel
Save