SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
VulkanInputAssembler.h
1#pragma once
2
3#include "spark/render/InputAssembler.h"
4#include "spark/render/vk/Export.h"
5#include "spark/render/vk/VulkanIndexBufferLayout.h"
6#include "spark/render/vk/VulkanVertexBufferLayout.h"
7
8#include <memory>
9#include <vector>
10
11namespace spark::render::vk
12{
13 class VulkanVertexBufferLayout;
14 class VulkanIndexBufferLayout;
15
19 class SPARK_RENDER_VK_EXPORT VulkanInputAssembler final : public InputAssembler<VulkanVertexBufferLayout, VulkanIndexBufferLayout>
20 {
21 public:
31 explicit VulkanInputAssembler(std::vector<std::unique_ptr<VulkanVertexBufferLayout>>&& vertex_buffer_layouts,
32 std::unique_ptr<VulkanIndexBufferLayout>&& index_buffer_layout,
33 PrimitiveTopology primitive_topology = PrimitiveTopology::TriangleList);
34 ~VulkanInputAssembler() override;
35
36 VulkanInputAssembler(const VulkanInputAssembler& other) = delete;
37 VulkanInputAssembler(VulkanInputAssembler&& other) noexcept = delete;
38 VulkanInputAssembler& operator=(const VulkanInputAssembler& other) = delete;
39 VulkanInputAssembler& operator=(VulkanInputAssembler&& other) noexcept = delete;
40
42 [[nodiscard]] PrimitiveTopology topology() const noexcept override;
43
45 [[nodiscard]] std::vector<const VulkanVertexBufferLayout*> vertexBufferLayouts() const noexcept override;
46
48 [[nodiscard]] const VulkanVertexBufferLayout& vertexBufferLayout(unsigned binding) const override;
49
51 [[nodiscard]] const VulkanIndexBufferLayout& indexBufferLayout() const noexcept override;
52
53 private:
54 struct Impl;
55 std::unique_ptr<Impl> m_impl;
56 };
57}
Represents a the input assembler state of a IRenderPipeline.
Definition InputAssembler.h:76
Implements IIndexBufferLayout for Vulkan.
Definition VulkanIndexBufferLayout.h:12
Vulkan implementation of IInputAssembler.
Definition VulkanInputAssembler.h:20
Implements IVertexBufferLayout for Vulkan.
Definition VulkanVertexBufferLayout.h:14
Definition VulkanInputAssembler.cpp:12