HoviTron Video Pipeline
Public Member Functions | Protected Member Functions | Protected Attributes
BuffersController Class Referenceabstract

abstract class for the management of the buffers, descriptors, ... More...

#include <BuffersControllerAbstract.h>

Inheritance diagram for BuffersController:
BufferControllerBlending BuffersControllerWarping

Public Member Functions

virtual void init ()=0
 
virtual void cleanUp ()=0
 
virtual void bindBuffers (vk::CommandBuffer &commandBuffer, int index, InputProvider::StreamFrameInfo &frameInfos, int view)=0
 
virtual void updateAllUniformBuffer (uint32_t currentImage, int view)=0
 
virtual void updateUniformBuffer (uint32_t currentImage, int view)=0
 
virtual void update (std::span< InputProvider::StreamFrameInfo > infos, int inputView)=0
 
virtual vk::VertexInputBindingDescription getBindingDescription ()=0
 
virtual std::vector< vk::VertexInputAttributeDescription > getAttributeDescription ()=0
 
virtual uint32_t getIndiceCount ()=0
 

Protected Member Functions

virtual void createVertexBuffer ()=0
 
virtual void createIndexBuffer ()=0
 
virtual void createUniformBuffer (int size)=0
 
virtual void createDescriptorPool ()=0
 
virtual void createDescriptorSets ()=0
 
void copyBuffer (vk::Buffer srcBuffer, vk::Buffer dstBuffer, vk::DeviceSize size)
 

Protected Attributes

int inputView = 0
 
VulkanContextcontext = nullptr
 
VulkanRenderPassrenderpass = nullptr
 

Detailed Description

abstract class for the management of the buffers, descriptors, ...

Abstract class that contains common functionnalities to manage the buffer (and their memory) for synthesis and blending steps. The buffers are for the uniforms, textures, indices, vertex, etc...

Definition at line 36 of file BuffersControllerAbstract.h.

Member Function Documentation

◆ bindBuffers()

virtual void BuffersController::bindBuffers ( vk::CommandBuffer &  commandBuffer,
int  index,
InputProvider::StreamFrameInfo frameInfos,
int  view 
)
pure virtual

Bind the buffers that should be used

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ cleanUp()

virtual void BuffersController::cleanUp ( )
pure virtual

Clean up allocated ressources

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ copyBuffer()

void BuffersController::copyBuffer ( vk::Buffer  srcBuffer,
vk::Buffer  dstBuffer,
vk::DeviceSize  size 
)
protected

Utility function to copy a buffer into another

Definition at line 24 of file BuffersControllerAbstract.cpp.

25{
26 vk::CommandBuffer commandBuffer = beginSingleTimeCommands(context, renderpass->commandPoolBuffer);
27
28 vk::BufferCopy copyRegion(0, 0, size);
29 commandBuffer.copyBuffer(srcBuffer, dstBuffer, 1, &copyRegion);
30
31 endSingleTimeCommands(context, renderpass->commandPoolBuffer, commandBuffer);
32
33}
VulkanRenderPass * renderpass

◆ createDescriptorPool()

virtual void BuffersController::createDescriptorPool ( )
protectedpure virtual

Create Descriptor pool

◆ createDescriptorSets()

virtual void BuffersController::createDescriptorSets ( )
protectedpure virtual

Create descriptors sets

◆ createIndexBuffer()

virtual void BuffersController::createIndexBuffer ( )
protectedpure virtual

Create the index buffer

◆ createUniformBuffer()

virtual void BuffersController::createUniformBuffer ( int  size)
protectedpure virtual

Create the uniform buffer

◆ createVertexBuffer()

virtual void BuffersController::createVertexBuffer ( )
protectedpure virtual

Create the vertex buffer

◆ getAttributeDescription()

virtual std::vector< vk::VertexInputAttributeDescription > BuffersController::getAttributeDescription ( )
pure virtual

Return the attribute description of this class

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ getBindingDescription()

virtual vk::VertexInputBindingDescription BuffersController::getBindingDescription ( )
pure virtual

Return the binding description of this class

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ getIndiceCount()

virtual uint32_t BuffersController::getIndiceCount ( )
pure virtual

Return the number of indices that should be draw

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ init()

virtual void BuffersController::init ( )
pure virtual

Initialize the different ressources needed

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ update()

virtual void BuffersController::update ( std::span< InputProvider::StreamFrameInfo infos,
int  inputView 
)
pure virtual

Using the information given as input update the different variables and struct of this class

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ updateAllUniformBuffer()

virtual void BuffersController::updateAllUniformBuffer ( uint32_t  currentImage,
int  view 
)
pure virtual

Update all buffer using the informations stored in this class (struct and other buffers)

Implemented in BufferControllerBlending, and BuffersControllerWarping.

◆ updateUniformBuffer()

virtual void BuffersController::updateUniformBuffer ( uint32_t  currentImage,
int  view 
)
pure virtual

Update a subset of the buffers stored in this class (the one that change frame to frame)

Implemented in BufferControllerBlending, and BuffersControllerWarping.

Field Documentation

◆ context

VulkanContext* BuffersController::context = nullptr
protected

pointer to the Vulkan context

Definition at line 77 of file BuffersControllerAbstract.h.

◆ inputView

int BuffersController::inputView = 0
protected

Correspond to the input camera

Definition at line 61 of file BuffersControllerAbstract.h.

◆ renderpass

VulkanRenderPass* BuffersController::renderpass = nullptr
protected

Pointer to the renderpass

Definition at line 79 of file BuffersControllerAbstract.h.


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