|
Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
Class maintaining a resizable array of templated classes in a managed buffer. More...
#include <foray_managedvectorbuffer.hpp>
Public Member Functions | |
| ManagedVectorBuffer () | |
| ManagedVectorBuffer (core::Context *context) | |
| ManagedVectorBuffer (core::Context *context, bool deviceLocal) | |
| void | InitOrUpdate (std::optional< BufferSection > section={}) |
| virtual void | Destroy () override |
| Destroy the resource. | |
| virtual bool | Exists () const override |
| Return true, if the managed resource is allocated. | |
| virtual std::string | GetName () const |
| virtual void | SetName (std::string_view name) override |
| Set a custom name for the object. | |
| virtual | ~ManagedVectorBuffer () |
| VkDeviceSize | GetDeviceSize () |
Public Member Functions inherited from foray::core::ManagedResource | |
| virtual std::string_view | GetTypeName () const |
| Return a hint for the type of resource managed by the instantiation. | |
| ManagedResource () | |
| Default constructor registers the resource. | |
| ManagedResource (std::string_view name) | |
| Registers the resource and sets its name. | |
| virtual | ~ManagedResource () |
| Unregisters the resource. | |
| std::string_view | GetName () const |
| Return a custom name for the object. | |
| std::string | Print () const |
| Print name and type in one string. | |
Public Member Functions inherited from foray::NoMoveDefaults | |
| NoMoveDefaults ()=default | |
| NoMoveDefaults (const NoMoveDefaults &other)=delete | |
| NoMoveDefaults (NoMoveDefaults &&other)=default | |
| NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Public Attributes | |
| const bool | DeviceLocal |
Protected Member Functions | |
| void | CreateBuffer (VkDeviceSize capacity) |
| void | UploadToBuffer (BufferSection section) |
Protected Attributes | |
| core::Context * | mContext = nullptr |
| std::vector< TClass > | mVector = {} |
| core::ManagedBuffer | mBuffer = {} |
| VkDeviceSize | mDeviceCount = 0 |
| VkDeviceSize | mDeviceCapacity = 0 |
| void * | mHostMemoryMap = nullptr |
Protected Attributes inherited from foray::core::ManagedResource | |
| std::string | mName |
| This objects custom name. | |
Additional Inherited Members | |
Static Public Member Functions inherited from foray::core::ManagedResource | |
| static void | sPrintAllocatedResources (bool printAsWarning) |
| Print a list of all registered existing resources. | |
| static const std::unordered_set< ManagedResource * > * | GetTotalAllocatedResources () |
Class maintaining a resizable array of templated classes in a managed buffer.
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inlinevirtual |
|
inlineprotected |
|
overridevirtual |
Destroy the resource.
Implements foray::core::ManagedResource.
|
inlineoverridevirtual |
Return true, if the managed resource is allocated.
Example: Vulkan object stored could be nullptr or instantiated
Implements foray::core::ManagedResource.
|
inline |
|
inlinevirtual |
| void foray::util::ManagedVectorBuffer< TClass >::InitOrUpdate | ( | std::optional< BufferSection > | section = {} | ) |
|
inlineoverridevirtual |
Set a custom name for the object.
Reimplemented from foray::core::ManagedResource.
|
inlineprotected |
| const bool foray::util::ManagedVectorBuffer< TClass >::DeviceLocal |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |