aboutsummaryrefslogtreecommitdiff
path: root/src/platform/vulkan/vulkan_vertex_buffer.h
blob: 3218021b449f9e4d29f52eaef2cc63d41c66ff36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include "rendering/vertex_buffer.h"

namespace Donut
{
	class VulkanVertexBuffer
        : public VertexBuffer
	{
	public:
		VulkanVertexBuffer(uint32_t size);
		VulkanVertexBuffer(float* vertices, uint32_t size);
		virtual ~VulkanVertexBuffer();

		virtual auto bind() const -> void override;
		virtual auto unbind() const -> void override;

		virtual auto set_data(const void* data, uint32_t size) -> void override;

		virtual auto get_layout() const -> const VertexBufferLayout& override{ return m_layout;  }
		virtual auto set_layout(const VertexBufferLayout& layout) -> void override{ m_layout = layout; }
	private:
		uint32_t           m_renderer_id;
		VertexBufferLayout m_layout;
	};
};