CMSC23700 Common Code Library
Support code for CS23700 programming projects
Loading...
Searching...
No Matches
cs237::UniformBuffer< UB > Class Template Reference

#include <cs237-buffer.hpp>

Inheritance diagram for cs237::UniformBuffer< UB >:
Collaboration diagram for cs237::UniformBuffer< UB >:

Public Types

using BufferType = UB
 the type of the buffer's contents
 

Public Member Functions

 UniformBuffer (Application *app)
 
 UniformBuffer (Application *app, UB const &src)
 
void copyTo (UB const &src)
 
vk::DescriptorBufferInfo descInfo ()
 get the default buffer-descriptor info for this buffer
 
- Public Member Functions inherited from cs237::Buffer
vk::Buffer vkBuffer () const
 get the Vulkan buffer object for this buffer
 
const MemoryObjmemory () 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
 

Detailed Description

template<typename UB>
class cs237::UniformBuffer< UB >

Buffer class for uniform data; the type parameter UB is the C++ struct type of the buffer contents

Member Typedef Documentation

◆ BufferType

template<typename UB >
using cs237::UniformBuffer< UB >::BufferType = UB

the type of the buffer's contents

Constructor & Destructor Documentation

◆ UniformBuffer() [1/2]

template<typename UB >
cs237::UniformBuffer< UB >::UniformBuffer ( Application app)
inline

constructor

Parameters
appthe owning application object

◆ UniformBuffer() [2/2]

template<typename UB >
cs237::UniformBuffer< UB >::UniformBuffer ( Application app,
UB const &  src 
)
inline

constructor with initialization

Parameters
appthe owning application object
[in]srcthe buffer contents to copy to the Vulkan memory buffer

Member Function Documentation

◆ copyTo()

template<typename UB >
void cs237::UniformBuffer< UB >::copyTo ( UB const &  src)
inline

copy the buffer data to the device memory object

Parameters
[in]srcthe buffer contents to copy to the Vulkan memory buffer

◆ descInfo()

template<typename UB >
vk::DescriptorBufferInfo cs237::UniformBuffer< UB >::descInfo ( )
inline

get the default buffer-descriptor info for this buffer


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