VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
VertexAttribute.h
1// Copyright (c) 2024 Michael Carlie. All Rights Reserved.
2//
3// This software is released under the MIT License.
4// https://opensource.org/licenses/MIT
5
6#ifndef INCLUDE_VULKANENGINE_VERTEXATTRIBUTE_H_
7#define INCLUDE_VULKANENGINE_VERTEXATTRIBUTE_H_
8
9#include <VulkanEngine/Attribute.h>
10
11#include <vector>
12#include <vulkan/vulkan.hpp>
13
14namespace VulkanEngine {
15
18template <typename T>
19class VertexAttribute : public Attribute {
20 public:
25 VertexAttribute(const T* data, size_t _num_elements, uint32_t _location,
26 vk::Format _format);
27
29 virtual ~VertexAttribute();
30
33 const vk::VertexInputBindingDescription getVkVertexInputBindingDescription(
34 uint32_t binding_index) const;
35
38 const vk::VertexInputAttributeDescription
39 getVkVertexInputAttributeDescriptions(uint32_t binding_index) const;
40
43 vk::Format getVkFormat() const;
44
45 private:
47 uint32_t location;
48
50 vk::Format format;
51};
52
53} // namespace VulkanEngine
54
55#include <VertexAttribute.cpp> // NOLINT(build/include)
56
57#endif // INCLUDE_VULKANENGINE_VERTEXATTRIBUTE_H_
Abstract base class for shader attributes.
Definition: Attribute.h:16
Definition: VertexAttribute.h:19
const vk::VertexInputBindingDescription getVkVertexInputBindingDescription(uint32_t binding_index) const
Definition: VertexAttribute.cpp:43
vk::Format getVkFormat() const
Definition: VertexAttribute.cpp:63
const vk::VertexInputAttributeDescription getVkVertexInputAttributeDescriptions(uint32_t binding_index) const
Definition: VertexAttribute.cpp:53
virtual ~VertexAttribute()
Destructor.
Definition: VertexAttribute.cpp:39
TODO development of this class is in progress.
Definition: Attribute.h:13