CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
#include <cs237-buffer.hpp>
Public Types | |
using | VertexType = V |
the type of vertices | |
Public Member Functions | |
VertexBuffer (Application *app, uint32_t nVerts) | |
VertexBuffer (Application *app, vk::ArrayProxy< V > const &src) | |
void | copyTo (vk::ArrayProxy< V > const &src) |
void | copyTo (vk::ArrayProxy< V > const &src, uint32_t offset) |
Public Member Functions inherited from cs237::Buffer | |
vk::Buffer | vkBuffer () const |
get the Vulkan buffer object for this buffer | |
const MemoryObj * | memory () const |
get the memory object for this buffer | |
vk::MemoryRequirements | requirements () |
get the memory requirements of this buffer | |
Additional Inherited Members | |
Protected Member Functions inherited from cs237::Buffer | |
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) |
Protected Attributes inherited from cs237::Buffer | |
Application * | _app |
the application | |
vk::Buffer | _buf |
the Vulkan buffer object | |
MemoryObj * | _mem |
the Vulkan memory object that holds the buffer | |
Buffer class for vertex data; the type parameter V
is the type of an individual vertex.
using cs237::VertexBuffer< V >::VertexType = V |
the type of vertices
|
inline |
constructor
app | the owning application object |
nVerts | the number of vertices 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 |