VenomEngine
Cross-Platform Modern Graphics Engine
|
Command Buffer class, only instanciable by VulkanCommandPool. To use them, you need to create a VulkanCommandPool and then create/access them via VulkanCommandPool. To make sure destruction and memory is handled in a correct way for command buffers, only VulkanCommandPool should own them. More...
#include <CommandPool.h>
Public Member Functions | |
CommandBuffer (const CommandBuffer &)=delete | |
CommandBuffer & | operator= (const CommandBuffer &)=delete |
CommandBuffer (CommandBuffer &&other) | |
CommandBuffer & | operator= (CommandBuffer &&other) |
VkCommandBuffer | GetVkCommandBuffer () const |
operator VkCommandBuffer () const | |
vc::Error | BeginCommandBuffer (VkCommandBufferUsageFlags flags=0) |
vc::Error | EndCommandBuffer () |
void | Reset (VkCommandBufferResetFlags flags) |
bool | BindPipeline (VkPipeline pipeline, VkPipelineBindPoint bindPoint) |
Bind a pipeline to the command buffer. | |
void | SetViewport (const VkViewport &viewport) const |
void | SetScissor (const VkRect2D &scissor) const |
void | Draw (uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) const |
void | DrawVertices (const VertexBuffer &vertexBuffer) const |
void | DrawMesh (const VulkanMesh *vulkanMesh, const int firstInstance, const VulkanShaderPipeline &pipeline) const |
void | DrawModel (const VulkanModel *vulkanModel, const int firstInstance, const VulkanShaderPipeline &pipeline) const |
void | DrawSkybox (const VulkanSkybox *vulkanSkybox, const VulkanShaderPipeline *shader) |
void | Dispatch (uint32_t groupX, uint32_t groupY, uint32_t groupZ) const |
void | PipelineBarrier (VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier *pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier *pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier *pImageMemoryBarriers) const |
void | PipelineBarrier (VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags) const |
void | CopyImage (const Image &image, const Image &getImage) |
void | CopySwapChainImage (const VkImage &image, const Image &getImage) |
void | ClearAttachments (uint32_t i, VkImageAspectFlags vkImageAspectFlagBits, VkClearValue vkClearValue) const |
void | PushConstants (const VulkanShaderPipeline *shaderPipeline, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void *pValues) const |
void | CopyBufferToImage (const Buffer &srcBuffer, const Image &dstImage) |
void | TransitionImageLayout (Image &image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout) |
void | TransitionImageLayout (Image &image, VkImageLayout oldLayout, VkImageLayout newLayout) |
void | ChangeImageLayout (vc::Texture &image, const VkImageLayout oldLayout, const VkImageLayout newLayout) |
void | ChangeImageLayout (vc::Texture &image, const VkImageLayout newLayout) |
void | BindDescriptorSets (VkPipelineBindPoint vkPipelineBindPoint, VkPipelineLayout vkPipelineLayout, uint32_t firstSet, VkDescriptorSet vkDescriptors) const |
void | BindDescriptorSets (VkPipelineBindPoint vkPipelineBindPoint, VkPipelineLayout vkPipelineLayout, uint32_t firstSet, uint32_t descriptSetCount, const VkDescriptorSet *vkDescriptors) const |
void | SubmitToQueue (VkFence fence=VK_NULL_HANDLE, VkSemaphore waitSemaphore=VK_NULL_HANDLE, VkPipelineStageFlags waitStage=0, VkSemaphore signalSemaphore=VK_NULL_HANDLE) |
void | WaitForQueue () const |
Protected Attributes | |
VkCommandBuffer | _commandBuffer |
const Queue * | _queue |
bool | _isActive |
VkPipeline | _lastBoundPipeline |
Friends | |
class | CommandPool |
class | RenderPass |
Command Buffer class, only instanciable by VulkanCommandPool. To use them, you need to create a VulkanCommandPool and then create/access them via VulkanCommandPool. To make sure destruction and memory is handled in a correct way for command buffers, only VulkanCommandPool should own them.
bool venom::vulkan::CommandBuffer::BindPipeline | ( | VkPipeline | pipeline, |
VkPipelineBindPoint | bindPoint ) |
Bind a pipeline to the command buffer.
pipeline | The pipeline to bind |
bindPoint | The bind point of the pipeline |