VulkanEngine 0.1
Graphics engine using Vulkan
Loading...
Searching...
No Matches
VulkanEngine::MeshBase Class Referenceabstract

Base class for Mesh specializations. More...

#include <MeshBase.h>

Inheritance diagram for VulkanEngine::MeshBase:
VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >

Public Member Functions

 MeshBase ()
 Constructor.
 
 ~MeshBase ()
 Destructor.
 
virtual const vk::PipelineVertexInputStateCreateInfo & createVkPipelineVertexInputStateCreateInfo ()=0
 
virtual const vk::PipelineInputAssemblyStateCreateInfo & createVkPipelineInputAssemblyStateCreateInfo ()=0
 
virtual void transferBuffers (const vk::CommandBuffer &command_buffer=nullptr)=0
 
virtual void bindVertexBuffers (const vk::CommandBuffer &command_buffer)=0
 
virtual void bindIndexBuffer (const vk::CommandBuffer &command_buffer)=0
 
virtual void draw (const vk::CommandBuffer &command_buffer)=0
 
template<typename PositionType >
const BoundingBox< PositionType > & getBoundingBox () const
 

Protected Attributes

std::shared_ptr< BoundingBoxBasebounding_box
 The Mesh's bounding box.
 

Detailed Description

Base class for Mesh specializations.

Member Function Documentation

◆ bindIndexBuffer()

virtual void VulkanEngine::MeshBase::bindIndexBuffer ( const vk::CommandBuffer &  command_buffer)
pure virtual

Bind the index buffer of this Mesh.

Parameters
command_bufferThe vk::CommandBuffer to insert the commands into.

Implemented in VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >.

◆ bindVertexBuffers()

virtual void VulkanEngine::MeshBase::bindVertexBuffers ( const vk::CommandBuffer &  command_buffer)
pure virtual

Bind VertexBuffers in this Mesh which will be used for rendering.

Parameters
command_bufferThe vk::CommandBuffer to insert the commands into.

Implemented in VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >.

◆ createVkPipelineInputAssemblyStateCreateInfo()

virtual const vk::PipelineInputAssemblyStateCreateInfo & VulkanEngine::MeshBase::createVkPipelineInputAssemblyStateCreateInfo ( )
pure virtual
Returns
The vk::PipelineInputAssemblyStateCreateInfo describing how to handle the input assembly stage for the Mesh.

Implemented in VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >.

◆ createVkPipelineVertexInputStateCreateInfo()

virtual const vk::PipelineVertexInputStateCreateInfo & VulkanEngine::MeshBase::createVkPipelineVertexInputStateCreateInfo ( )
pure virtual
Returns
The vk::PipelineVertexInputStateCreateInfo instance describing the attributes that consitute the Mesh.

Implemented in VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >.

◆ draw()

virtual void VulkanEngine::MeshBase::draw ( const vk::CommandBuffer &  command_buffer)
pure virtual

Insert drawing commands.

Parameters
command_bufferThe vk::CommandBuffer to insert the commands into.

Implemented in VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >.

◆ transferBuffers()

virtual void VulkanEngine::MeshBase::transferBuffers ( const vk::CommandBuffer &  command_buffer = nullptr)
pure virtual

Start transfer of data belonging to all associated VertexAttribute instances from staging buffer to vertex buffer memory.

Parameters
command_bufferThe vk::CommandBuffer to insert the commands into. If none is provided a vk::CommandBuffer will be allocated and executed automatically.

Implemented in VulkanEngine::Mesh< PositionType, IndexType, AdditionalAttributeTypes >.


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