diff options
Diffstat (limited to 'src/rendering/vertex_buffer.h')
| -rw-r--r-- | src/rendering/vertex_buffer.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/rendering/vertex_buffer.h b/src/rendering/vertex_buffer.h index 77a76c9..9cf66d8 100644 --- a/src/rendering/vertex_buffer.h +++ b/src/rendering/vertex_buffer.h @@ -12,7 +12,7 @@ namespace Donut uint8_t normalized; uint32_t offset; - static uint32_t get_size_of_type(uint32_t type); + static auto get_size_of_type(uint32_t type) -> uint32_t; }; class VertexBufferLayout @@ -22,7 +22,7 @@ namespace Donut ~VertexBufferLayout() = default; template<typename T> - void push(uint32_t count) + auto push(uint32_t count) -> void { static_assert(false); } @@ -48,8 +48,8 @@ namespace Donut m_stride += count * VertexBufferElement::get_size_of_type(0x1401); } - inline const std::vector<VertexBufferElement>& get_elements() const { return m_elements; } - inline uint32_t get_stride() const { return m_stride; } + inline auto get_elements() const -> const std::vector<VertexBufferElement>& { return m_elements; } + inline auto get_stride() const -> uint32_t { return m_stride; } private: std::vector<VertexBufferElement> m_elements; @@ -61,13 +61,13 @@ namespace Donut public: virtual ~VertexBuffer() = default; - virtual void bind() const = 0; - virtual void unbind() const = 0; - virtual void set_data(const void* data, uint32_t size) = 0; + virtual auto bind() const -> void = 0; + virtual auto unbind() const -> void = 0; + virtual auto set_data(const void* data, uint32_t size) -> void = 0; - virtual const VertexBufferLayout& get_layout() const = 0; - virtual void set_layout(const VertexBufferLayout& layout) = 0; + virtual auto get_layout() const -> const VertexBufferLayout& = 0; + virtual auto set_layout(const VertexBufferLayout& layout) -> void = 0; - static VertexBuffer* create(const void* data, uint32_t size); + static auto create(const void* data, uint32_t size) -> VertexBuffer*; }; }; |
