Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Protected Attributes | List of all members
castor3d::RenderCube Class Reference

#include <RenderCube.hpp>

Inheritance diagram for castor3d::RenderCube:
Inheritance graph
[legend]
Collaboration diagram for castor3d::RenderCube:
Collaboration graph
[legend]

Public Member Functions

virtual C3D_API ~RenderCube ()
 
C3D_API RenderCube (RenderDevice const &device, bool nearest, SamplerObs sampler={})
 Constructor.
 
C3D_API void createPipelines (VkExtent2D const &size, ashes::PipelineShaderStageCreateInfoArray const &program, ashes::ImageView const &view, ashes::RenderPass const &renderPass, ashes::VkPushConstantRangeArray const &pushRanges)
 Creates the rendering pipelines.
 
C3D_API void createPipelines (VkExtent2D const &size, ashes::PipelineShaderStageCreateInfoArray const &program, ashes::ImageView const &view, ashes::RenderPass const &renderPass, ashes::VkPushConstantRangeArray const &pushRanges, ashes::PipelineDepthStencilStateCreateInfo const &dsState)
 Creates the rendering pipelines.
 
C3D_API void cleanup () noexcept
 Cleans up GPU objects.
 
C3D_API void prepareFrame (ashes::RenderPass const &renderPass, uint32_t subpassIndex, uint32_t face)
 Prepares the commands to render one face from the cube.
 
C3D_API void registerFrame (ashes::CommandBuffer &commandBuffer, uint32_t face) const
 Prepares the commands to render one face from the cube, inside given command buffer.
 

Protected Attributes

RenderDevice const & m_device
 
SamplerObs m_sampler {}
 
ashes::PipelineLayoutPtr m_pipelineLayout
 

Constructor & Destructor Documentation

◆ ~RenderCube()

virtual C3D_API castor3d::RenderCube::~RenderCube ( )
virtual

◆ RenderCube()

C3D_API castor3d::RenderCube::RenderCube ( RenderDevice const & device,
bool nearest,
SamplerObs sampler = {} )
explicit

Constructor.

Parameters
[in]deviceThe GPU device.
[in]nearestTells if the sampler needs a Nearest filter or not, if sampler is nullptr.
[in]samplerThe sampler to use.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::RenderCube::cleanup ( )
noexcept

Cleans up GPU objects.

◆ createPipelines() [1/2]

C3D_API void castor3d::RenderCube::createPipelines ( VkExtent2D const & size,
ashes::PipelineShaderStageCreateInfoArray const & program,
ashes::ImageView const & view,
ashes::RenderPass const & renderPass,
ashes::VkPushConstantRangeArray const & pushRanges )

Creates the rendering pipelines.

Parameters
[in]sizeThe render size.
[in]programThe shader program.
[in]viewThe source view.
[in]renderPassThe render pass to use.
[in]pushRangesThe push constant ranges.

◆ createPipelines() [2/2]

C3D_API void castor3d::RenderCube::createPipelines ( VkExtent2D const & size,
ashes::PipelineShaderStageCreateInfoArray const & program,
ashes::ImageView const & view,
ashes::RenderPass const & renderPass,
ashes::VkPushConstantRangeArray const & pushRanges,
ashes::PipelineDepthStencilStateCreateInfo const & dsState )

Creates the rendering pipelines.

Parameters
[in]sizeThe render size.
[in]programThe shader program.
[in]viewThe source view.
[in]renderPassThe render pass to use.
[in]pushRangesThe push constant ranges.
[in]dsStateThe depth stencil state to use.

◆ prepareFrame()

C3D_API void castor3d::RenderCube::prepareFrame ( ashes::RenderPass const & renderPass,
uint32_t subpassIndex,
uint32_t face )

Prepares the commands to render one face from the cube.

Parameters
[in]renderPassThe render pass to use.
[in]subpassIndexThe render subpass index.
[in]faceThe face index.

◆ registerFrame()

C3D_API void castor3d::RenderCube::registerFrame ( ashes::CommandBuffer & commandBuffer,
uint32_t face ) const

Prepares the commands to render one face from the cube, inside given command buffer.

Parameters
[in,out]commandBufferThe command buffer.
[in]faceThe face index.

Member Data Documentation

◆ m_device

RenderDevice const& castor3d::RenderCube::m_device
protected

◆ m_pipelineLayout

ashes::PipelineLayoutPtr castor3d::RenderCube::m_pipelineLayout
protected

◆ m_sampler

SamplerObs castor3d::RenderCube::m_sampler {}
protected

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