| Fling Engine 0.00.1 Fling Engine is a game engine written in Vulkan

Public Types | Public Member Functions | Private Attributes
Fling::CommandBuffer Class Reference

Encapsulates functionality of a Vulkan Command buffer. More...

`#include <CommandBuffer.h>`

## Public Types
enum | ResetMode { ResetMode::ResetPool, ResetMode::ResetIndividually, ResetMode::AlwaysAllocate }
enum | State { State::Invalid, State::Initial, State::Recording, State::Executable }

## Public Member Functions
| CommandBuffer (const LogicalDevice *t_Device, VkCommandPool t_CmdPool)
| ~CommandBuffer ()
VkCommandBuffer | GetHandle () const
const LogicalDevice * | GetDevice () const
const VkCommandPool & | GetPoolHandle () const
void | Begin (VkCommandBufferUsageFlagBits t_Usage=VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT)
| Begin recording for this command buffer. More...
void | BeginRenderPass (FrameBuffer &t_frameBuf, const std::vector< VkClearValue > &t_ClearVales)
void | NextSubpass ()
void | BindPipeline (VkPipelineBindPoint t_BindPoint, VkPipeline t_Pipeline)
void | SetViewport (UINT32 first_viewport, const std::vector< VkViewport > &viewports)
void | SetScissor (UINT32 first_scissor, const std::vector< VkRect2D > &scissors)
void | EndRenderPass ()
void | End ()
| Stop recording commands to the command buffer. More...
bool | IsRecording () const

## Private Attributes
const LogicalDevice * | m_Device
const VkCommandPool | m_Pool
VkCommandBuffer | m_Handle = VK_NULL_HANDLE
State | m_State = State::Initial

## Detailed Description

Encapsulates functionality of a Vulkan Command buffer.

## Member Enumeration Documentation

## ◆ ResetMode

enum Fling::CommandBuffer::ResetMode
| strong

Enumerator
ResetPool |
ResetIndividually |
AlwaysAllocate |

## ◆ State

enum Fling::CommandBuffer::State
| strong

Enumerator
Invalid |
Initial |
Recording |
Executable |

## Constructor & Destructor Documentation

## ◆ CommandBuffer()

Fling::CommandBuffer::CommandBuffer | ( | const LogicalDevice * | t_Device,
|  | VkCommandPool | t_CmdPool
| ) |  |

## ◆ ~CommandBuffer()

Fling::CommandBuffer::~CommandBuffer | ( |  | ) |

## Member Function Documentation

## ◆ Begin()

void Fling::CommandBuffer::Begin | ( | VkCommandBufferUsageFlagBits | t_Usage = `VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT` | ) |

Begin recording for this command buffer.

## ◆ BeginRenderPass()

void Fling::CommandBuffer::BeginRenderPass | ( | FrameBuffer & | t_frameBuf,
|  | const std::vector< VkClearValue > & | t_ClearVales
| ) |  |

## ◆ BindPipeline()

void Fling::CommandBuffer::BindPipeline | ( | VkPipelineBindPoint | t_BindPoint,
|  | VkPipeline | t_Pipeline
| ) |  |

## ◆ End()

void Fling::CommandBuffer::End | ( |  | ) |

Stop recording commands to the command buffer.

## ◆ EndRenderPass()

void Fling::CommandBuffer::EndRenderPass | ( |  | ) |

## ◆ GetDevice()

const LogicalDevice* Fling::CommandBuffer::GetDevice | ( |  | ) | const
| inline

## ◆ GetHandle()

VkCommandBuffer Fling::CommandBuffer::GetHandle | ( |  | ) | const
| inline

## ◆ GetPoolHandle()

const VkCommandPool& Fling::CommandBuffer::GetPoolHandle | ( |  | ) | const
| inline

## ◆ IsRecording()

bool Fling::CommandBuffer::IsRecording | ( |  | ) | const
| inline

## ◆ NextSubpass()

void Fling::CommandBuffer::NextSubpass | ( |  | ) |

## ◆ SetScissor()

void Fling::CommandBuffer::SetScissor | ( | UINT32 | first_scissor,
|  | const std::vector< VkRect2D > & | scissors
| ) |  |

## ◆ SetViewport()

void Fling::CommandBuffer::SetViewport | ( | UINT32 | first_viewport,
|  | const std::vector< VkViewport > & | viewports
| ) |  |

## Field Documentation

## ◆ m_Device

const LogicalDevice* Fling::CommandBuffer::m_Device
| private

## ◆ m_Handle

VkCommandBuffer Fling::CommandBuffer::m_Handle = VK_NULL_HANDLE
| private

## ◆ m_Pool

const VkCommandPool Fling::CommandBuffer::m_Pool
| private

## ◆ m_State

State Fling::CommandBuffer::m_State = State::Initial
| private

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

- FlingEngine/Graphics/inc/CommandBuffer.h
- FlingEngine/Graphics/src/CommandBuffer.cpp