VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
VulkanEngine::VertexAttribute< T > Class Template Reference

#include <VertexAttribute.h>

Inheritance diagram for VulkanEngine::VertexAttribute< T >:
VulkanEngine::Attribute VulkanEngine::StagedBuffer< Buffer > VulkanEngine::Buffer VulkanEngine::StagedBufferDestination VulkanEngine::BufferBase VulkanEngine::SingleUsageCommandBuffer

Public Member Functions

 VertexAttribute (const T *data, size_t _num_elements, uint32_t _location, vk::Format _format)
 
virtual ~VertexAttribute ()
 Destructor.
 
const vk::VertexInputBindingDescription getVkVertexInputBindingDescription (uint32_t binding_index) const
 
const vk::VertexInputAttributeDescription getVkVertexInputAttributeDescriptions (uint32_t binding_index) const
 
vk::Format getVkFormat () const
 
- Public Member Functions inherited from VulkanEngine::Attribute
 Attribute (size_t _num_elements, size_t _element_size, vk::BufferUsageFlags flags)
 
 ~Attribute ()
 Destructor.
 
size_t getNumElements () const
 
- Public Member Functions inherited from VulkanEngine::StagedBuffer< Buffer >
 StagedBuffer (DestinationClassArgs... args)
 
 ~StagedBuffer ()
 Destructor.
 
void transferBuffer (const vk::CommandBuffer &command_buffer=nullptr)
 
void updateBuffer (const void *_data, size_t _data_size) override
 
- Public Member Functions inherited from VulkanEngine::Buffer
 Buffer (size_t _data_size, vk::BufferUsageFlags usage_flags, vk::MemoryPropertyFlags memory_property_flags, VmaMemoryUsage vma_memory_usage)
 
 ~Buffer ()
 Destructor.
 
const vk::Buffer getVkBuffer () const
 
virtual void insertTransferCommand (const vk::CommandBuffer &command_buffer, const vk::Buffer &source_buffer)
 
virtual size_t getStagingBufferSize () const
 
virtual void updateBuffer (const void *_data, size_t _data_size)
 

Additional Inherited Members

- Protected Member Functions inherited from VulkanEngine::SingleUsageCommandBuffer
void beginSingleUsageCommandBuffer ()
 Creates and starts recording the command buffer.
 
void endSingleUsageCommandBuffer ()
 Stops recording and submits the command buffer.
 
- Protected Attributes inherited from VulkanEngine::Attribute
size_t num_elements
 The number of elements in this attribute.
 
size_t element_size
 The data size of the elements which this attribute is represented by.
 
- Protected Attributes inherited from VulkanEngine::StagedBuffer< Buffer >
Buffer source_buffer
 
- Protected Attributes inherited from VulkanEngine::Buffer
size_t data_size
 The size of the data.
 
- Protected Attributes inherited from VulkanEngine::BufferBase
VmaAllocation vma_allocation
 
- Protected Attributes inherited from VulkanEngine::SingleUsageCommandBuffer
vk::CommandBuffer single_use_command_buffer
 The single use command buffer.
 

Detailed Description

template<typename T>
class VulkanEngine::VertexAttribute< T >

Class which represents a vertex attribute.

Template Parameters
TThe type to use to represent data elements.

Constructor & Destructor Documentation

◆ VertexAttribute()

template<typename T >
VulkanEngine::VertexAttribute< T >::VertexAttribute ( const T *  data,
size_t  _num_elements,
uint32_t  _location,
vk::Format  _format 
)

Constructor.

Parameters
dataThe vertex data which will be represented by this VertexAttribute instance.
bindingThe binding index of the vertex attribute.

Member Function Documentation

◆ getVkFormat()

template<typename T >
vk::Format VulkanEngine::VertexAttribute< T >::getVkFormat
Returns
The vk::Format of the VertexAttribute describing the format of the vertex data.

◆ getVkVertexInputAttributeDescriptions()

template<typename T >
const vk::VertexInputAttributeDescription VulkanEngine::VertexAttribute< T >::getVkVertexInputAttributeDescriptions ( uint32_t  binding_index) const
Returns
All vk::VertexInputAttributeDescription for this VertexAttribute instance.

◆ getVkVertexInputBindingDescription()

template<typename T >
const vk::VertexInputBindingDescription VulkanEngine::VertexAttribute< T >::getVkVertexInputBindingDescription ( uint32_t  binding_index) const
Returns
The Vulkan VertexInputBindingDescription for this VertexAttribute instance.

The documentation for this class was generated from the following files: