SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::CommandBuffer Class Reference

This class wraps a Vulkan command buffer. More...

#include <command_buffer.hpp>

Public Member Functions

 CommandBuffer (void)
 Creates a new command buffer. More...
 
 ~CommandBuffer (void)
 Destroys the command buffer. More...
 
VkCommandBuffer getHandle ()
 Returns the handle of the command buffer. More...
 
void begin ()
 Begins recording of the command buffer. More...
 
void end ()
 Ends recording of the command buffer. More...
 
void beginRenderPass (RenderPass *renderPass)
 Begins a render pass. More...
 
void endRenderPass ()
 Ends the current render pass. More...
 
void bindPipeline (GraphicsPipeline *pipeline)
 Binds a graphics pipeline to the command buffer. More...
 
void bindVertexBuffer (VertexBuffer *vertexBuffer, uint32_t binding)
 Binds a vertex buffer to the command buffer. More...
 
void bindDescriptorSet (DescriptorSet *descriptorSet, GraphicsPipeline *graphicsPipeline, uint32_t binding)
 Binds a descriptor set to the command buffer. More...
 
void draw (uint32_t vertexCount)
 Draws primitives. More...
 
void submit ()
 Submits the command buffer. More...
 

Detailed Description

This class wraps a Vulkan command buffer.

Definition at line 53 of file command_buffer.hpp.

Constructor & Destructor Documentation

sgl::CommandBuffer::CommandBuffer ( void  )

Creates a new command buffer.

Definition at line 48 of file command_buffer.cpp.

sgl::CommandBuffer::~CommandBuffer ( void  )

Destroys the command buffer.

Definition at line 65 of file command_buffer.cpp.

Member Function Documentation

void sgl::CommandBuffer::begin ( )

Begins recording of the command buffer.

Definition at line 77 of file command_buffer.cpp.

void sgl::CommandBuffer::beginRenderPass ( RenderPass renderPass)

Begins a render pass.

Parameters
renderPassThe render pass to use.

Definition at line 102 of file command_buffer.cpp.

void sgl::CommandBuffer::bindDescriptorSet ( DescriptorSet descriptorSet,
GraphicsPipeline graphicsPipeline,
uint32_t  binding 
)

Binds a descriptor set to the command buffer.

Parameters
descriptorSetThe descriptor set to bind.
graphicsPipelineThe graphics pipeline to get the layout from.
bindingThe binding index of the descriptor set.

Definition at line 140 of file command_buffer.cpp.

void sgl::CommandBuffer::bindPipeline ( GraphicsPipeline pipeline)

Binds a graphics pipeline to the command buffer.

Parameters
pipelineThe graphics pipeline to bind.

Definition at line 130 of file command_buffer.cpp.

void sgl::CommandBuffer::bindVertexBuffer ( VertexBuffer vertexBuffer,
uint32_t  binding 
)

Binds a vertex buffer to the command buffer.

Parameters
vertexBufferThe vertex buffer to bind.
bindingThe binding index of the vertex buffer.

Definition at line 134 of file command_buffer.cpp.

void sgl::CommandBuffer::draw ( uint32_t  vertexCount)

Draws primitives.

Parameters
vertexCountThe number of vertices to draw.

Definition at line 146 of file command_buffer.cpp.

void sgl::CommandBuffer::end ( )

Ends recording of the command buffer.

Definition at line 96 of file command_buffer.cpp.

void sgl::CommandBuffer::endRenderPass ( )

Ends the current render pass.

Definition at line 126 of file command_buffer.cpp.

VkCommandBuffer sgl::CommandBuffer::getHandle ( )

Returns the handle of the command buffer.

Returns
The handle of the command buffer.

Definition at line 73 of file command_buffer.cpp.

void sgl::CommandBuffer::submit ( )

Submits the command buffer.

Definition at line 150 of file command_buffer.cpp.


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