![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
#include <buffer.hpp>
Public Types | |
using | BufferType = SV |
the type of the buffer's contents | |
Public Member Functions | |
StorageVertexBuffer (Application *app, uint32_t nVerts) | |
StorageVertexBuffer (Application *app, vk::ArrayProxy< SV > const &src) | |
void | copyTo (vk::ArrayProxy< SV > const &src) |
void | copyTo (vk::ArrayProxy< SV > const &src, uint32_t offset) |
vk::DescriptorBufferInfo | descInfo () |
get the default buffer-descriptor info for this buffer | |
![]() | |
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 StorageVertexBuffer<SV>
is both a storage buffer and a vertex buffer that can be read by the graphics pipeline, where SV
is the vertex type
using cs237::StorageVertexBuffer< SV >::BufferType = SV |
the type of the buffer's contents
|
inline |
constructor
app | the owning application object |
nVerts | the number of vertices that can be stored in the buffer |
|
inline |
constructor with initialization
app | the owning application object |
src | the array of vertices used to initialize the buffer |
|
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