hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/platform/vulkan/vulkan_vertex_array.h
blob: b36c421911d6a1fca635bfe2191f91ce04d8ca67 (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
27
#pragma once

#include "rendering/vertex_array.h"

namespace Donut
{
	class VulkanVertexArray 
		: public VertexArray
	{
	public:
		VulkanVertexArray();
		virtual ~VulkanVertexArray();

		virtual void bind()   const override;
		virtual void unbind() const override;

		virtual void add_vertex_buffer(const std::shared_ptr<VertexBuffer>& vertex_buffer) override;
		virtual void set_index_buffer(const std::shared_ptr<IndexBuffer>& index_buffer)   override;

		virtual const std::vector<std::shared_ptr<VertexBuffer>>& get_vertex_buffers() const { return m_vertex_buffers; }
		virtual const std::shared_ptr<IndexBuffer>& get_index_buffer()                 const { return m_index_buffer;   }
	private:
		uint32_t                                   m_renderer_id;
		std::vector<std::shared_ptr<VertexBuffer>> m_vertex_buffers;
		std::shared_ptr<IndexBuffer>               m_index_buffer;
	};
};