Class BufferResource¶
Defined in File render_graph.hpp
Inheritance Relationships¶
Base Type¶
public inexor::vulkan_renderer::RenderResource
(Class RenderResource)
Class Documentation¶
-
class BufferResource : public inexor::vulkan_renderer::RenderResource¶
Public Functions
-
inline BufferResource(std::string &&name, BufferUsage usage)¶
-
void add_vertex_attribute(VkFormat format, std::uint32_t offset)¶
Specifies that element
offset
of this vertex buffer is of formatformat
.Note
Calling this function is only valid on buffers of type BufferUsage::VERTEX_BUFFER.
-
inline void set_element_size(std::size_t element_size)¶
Specifies the element size of the buffer upfront if data is not to be uploaded immediately.
- Parameters
element_size – The element size in bytes
-
template<typename T>
void upload_data(const T *data, std::size_t count)¶ Specifies the data that should be uploaded to this buffer at the start of the next frame.
- Parameters
count – The number of elements (not bytes) to upload
data – A pointer to a contiguous block of memory that is at least
count * sizeof(T)
bytes long
-
inline BufferResource(std::string &&name, BufferUsage usage)¶