SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
VulkanVertexBufferLayout.h
1#pragma once
2
3#include "spark/render/VertexBuffer.h"
4#include "spark/render/vk/Export.h"
5
6#include <memory>
7
8namespace spark::render::vk
9{
13 class SPARK_RENDER_VK_EXPORT VulkanVertexBufferLayout final : public IVertexBufferLayout
14 {
15 public:
21 explicit VulkanVertexBufferLayout(std::size_t vertex_size, unsigned int binding = 0);
23
25 VulkanVertexBufferLayout(VulkanVertexBufferLayout&& other) noexcept = delete;
26 VulkanVertexBufferLayout& operator=(const VulkanVertexBufferLayout& other) = delete;
27 VulkanVertexBufferLayout& operator=(VulkanVertexBufferLayout&& other) noexcept = delete;
28
30 [[nodiscard]] std::vector<const BufferAttribute*> attributes() const noexcept override;
31
33 void addAttribute(BufferAttribute&& attribute) noexcept override;
34
36 [[nodiscard]] std::size_t elementSize() const noexcept override;
37
39 [[nodiscard]] unsigned int binding() const noexcept override;
40
42 [[nodiscard]] BufferType type() const noexcept override;
43
44 private:
45 struct Impl;
46 std::unique_ptr<Impl> m_impl;
47 };
48}
Stores metadata about a buffer attribute, member or field of a descriptor or buffer.
Definition Buffer.h:193
Describes the layout of a vertex buffer.
Definition VertexBuffer.h:14
Implements IVertexBufferLayout for Vulkan.
Definition VulkanVertexBufferLayout.h:14
VulkanVertexBufferLayout(std::size_t vertex_size, unsigned int binding=0)
Initializes a new IVertexBufferLayout for use with Vulkan.
Definition VulkanVertexBufferLayout.cpp:10