PixelBullet  0.0.1
A C++ game engine
Loading...
Searching...
No Matches
PixelBullet::CommandBuffer Class Reference

Class that represents a command buffer. More...

#include <CommandBuffer.hpp>

Public Member Functions

 CommandBuffer (const LogicalDevice *logicalDevice, bool begin=true, VkQueueFlagBits queueType=VK_QUEUE_GRAPHICS_BIT, VkCommandBufferLevel bufferLevel=VK_COMMAND_BUFFER_LEVEL_PRIMARY)
 
void Begin (VkCommandBufferUsageFlags usage=VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT)
 
void End ()
 
void SubmitIdle ()
 
void Submit (const VkSemaphore &waitSemaphore=VK_NULL_HANDLE, const VkSemaphore &signalSemaphore=VK_NULL_HANDLE, VkFence fence=VK_NULL_HANDLE)
 
 operator const VkCommandBuffer & () const
 
const VkCommandBuffer & GetCommandBuffer () const
 
bool IsRunning () const
 

Detailed Description

Class that represents a command buffer.

Constructor & Destructor Documentation

◆ CommandBuffer()

PixelBullet::CommandBuffer::CommandBuffer ( const LogicalDevice * logicalDevice,
bool begin = true,
VkQueueFlagBits queueType = VK_QUEUE_GRAPHICS_BIT,
VkCommandBufferLevel bufferLevel = VK_COMMAND_BUFFER_LEVEL_PRIMARY )
explicit

Creates a new command buffer.

Parameters
beginIf recording will start right away, if true CommandBuffer#Begin is called.
queueTypeThe queue to run this command buffer on.
bufferLevelThe buffer level.

Member Function Documentation

◆ Begin()

void PixelBullet::CommandBuffer::Begin ( VkCommandBufferUsageFlags usage = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT)

Begins the recording state for this command buffer.

Parameters
usageHow this command buffer will be used.

◆ End()

void PixelBullet::CommandBuffer::End ( )

Ends the recording state for this command buffer.

◆ Submit()

void PixelBullet::CommandBuffer::Submit ( const VkSemaphore & waitSemaphore = VK_NULL_HANDLE,
const VkSemaphore & signalSemaphore = VK_NULL_HANDLE,
VkFence fence = VK_NULL_HANDLE )

Submits the command buffer.

Parameters
waitSemaphoreA optional semaphore that will waited upon before the command buffer is executed.
signalSemaphoreA optional that is signaled once the command buffer has been executed.
fenceA optional fence that is signaled once the command buffer has completed.

◆ SubmitIdle()

void PixelBullet::CommandBuffer::SubmitIdle ( )

Submits the command buffer to the queue and will hold the current thread idle until it has finished.


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