Foray Library
rapid prototyping framework for crossplatform development of vulkan hardware ray tracing applications
|
VkCommandBuffer wrapper. More...
#include <foray_commandbuffer.hpp>
Public Member Functions | |
CommandBuffer ()=default | |
virtual | ~CommandBuffer () |
virtual VkCommandBuffer | Create (Context *context, VkCommandBufferLevel cmdBufferLvl=VK_COMMAND_BUFFER_LEVEL_PRIMARY, bool begin=false) |
Create based on the contexts device, command pool and queue. | |
virtual void | Begin () |
vkBeginCommandBuffer(); | |
virtual void | End () |
vkEndCommandBuffer() | |
virtual void | Reset (VkCommandBufferResetFlags flags=0) |
vkResetCommandBuffer() | |
virtual void | Destroy () override |
Destroys the associated resources. | |
virtual bool | Exists () const override |
Return true, if the managed resource is allocated. | |
virtual void | SetName (std::string_view name) override |
Set a custom name for the object. | |
operator VkCommandBuffer () const | |
![]() | |
VulkanResource () | |
VulkanResource (std::string_view name) | |
virtual std::string_view | GetTypeName () const |
Returns <OBJECT_TYPE> stringified. | |
![]() | |
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. | |
![]() | |
NoMoveDefaults ()=default | |
NoMoveDefaults (const NoMoveDefaults &other)=delete | |
NoMoveDefaults (NoMoveDefaults &&other)=default | |
NoMoveDefaults & | operator= (const NoMoveDefaults &other)=delete |
Protected Attributes | |
core::Context * | mContext = nullptr |
VkCommandBuffer | mCommandBuffer {} |
bool | mIsRecording = false |
![]() | |
std::string | mName |
This objects custom name. | |
Additional Inherited Members | |
![]() | |
static void | sPrintAllocatedResources (bool printAsWarning) |
Print a list of all registered existing resources. | |
static const std::unordered_set< ManagedResource * > * | GetTotalAllocatedResources () |
![]() | |
virtual void | SetObjectName (core::Context *context, const void *handle, std::string_view name, bool updateResourceName=true) |
Set the object name. Sets both ManagedResource::mName aswell as vulkan debug object name. | |
VkCommandBuffer wrapper.
|
default |
|
inlinevirtual |
|
virtual |
vkBeginCommandBuffer();
|
virtual |
Create based on the contexts device, command pool and queue.
Reimplemented in foray::core::HostSyncCommandBuffer.
|
overridevirtual |
Destroys the associated resources.
Implements foray::core::ManagedResource.
Reimplemented in foray::core::HostSyncCommandBuffer.
|
virtual |
vkEndCommandBuffer()
|
inlineoverridevirtual |
Return true, if the managed resource is allocated.
Example: Vulkan object stored could be nullptr or instantiated
Implements foray::core::ManagedResource.
|
inline |
|
virtual |
vkResetCommandBuffer()
|
overridevirtual |
Set a custom name for the object.
Reimplemented from foray::core::ManagedResource.
|
protected |
|
protected |
|
protected |