![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
#include <buffer.hpp>
Public Types | |
using | BufferType = S |
the type of the buffer's contents | |
Public Member Functions | |
StorageBuffer (Application *app) | |
StorageBuffer (Application *app, S const &src) | |
StorageBuffer (Application *app, vk::ArrayProxy< S > const &src) | |
void | copyTo (S const &src) |
vk::DescriptorBufferInfo | descInfo () |
get the default buffer-descriptor info for this buffer | |
void | copyTo (vk::ArrayProxy< S > const &src) |
void | copyTo (vk::ArrayProxy< S > const &src, uint32_t offset) |
![]() | |
vk::Buffer | vkBuffer () const |
get the Vulkan buffer object for this buffer | |
MemoryObj * | memory () const |
get the memory object for this buffer | |
vk::MemoryRequirements | requirements () |
get the memory requirements of this buffer | |
Additional Inherited Members | |
![]() | |
Buffer (Application *app, vk::BufferUsageFlags usage, size_t sz) | |
~Buffer () | |
destructor | |
void | _copyTo (const void *src, size_t offset, size_t sz) |
void | _copyTo (const void *src) |
![]() | |
Application * | _app |
the application | |
vk::Buffer | _buf |
the Vulkan buffer object | |
MemoryObj * | _mem |
the Vulkan memory object that holds the buffer | |
A StorageBuffer<S>
is both a wrapper around a Vulkan storage buffer that can be read by the graphics pipeline.
using cs237::StorageBuffer< S >::BufferType = S |
the type of the buffer's contents
|
inline |
constructor
app | the owning application object |
|
inline |
constructor with initialization
app | the owning application object | |
[in] | src | the buffer contents to copy to the Vulkan memory buffer |
|
inline |
constructor
app | the owning application object | |
[in] | src | the buffer contents to copy to the Vulkan memory buffer |
|
inline |
copy the buffer data to the device memory object
[in] | src | the buffer contents to copy to the Vulkan memory buffer TODO: Will have to change this potentially. SSBO having an identity crisis |
|
inline |
copy vertices to the device memory object
src | proxy array of vertices |
|
inline |
copy vertices to the device memory object
src | proxy array of vertices |
offset | offset from the beginning of the buffer to copy the data to |
|
inline |
get the default buffer-descriptor info for this buffer