Castor3D 0.17.0
Multiplatform 3D engine
Public Member Functions | Friends | List of all members
castor3d::TextureView Class Reference

#include <TextureView.hpp>

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

Public Member Functions

C3D_API TextureView (TextureLayout &layout, ashes::ImageViewCreateInfo info, uint32_t index, castor::String debugName)
 Constructor.
 
C3D_API bool initialise ()
 Initialises the view.
 
C3D_API void update (VkImage image, uint32_t baseArrayLayer, uint32_t layerCount, uint32_t baseMipLevel, uint32_t levelCount)
 Updates the view range.
 
C3D_API void update (VkExtent3D const &extent, VkFormat format, uint32_t mipLevels, uint32_t arrayLayers)
 Updates the view range.
 
C3D_API void cleanup ()
 Cleans up the view.
 
- Public Member Functions inherited from castor::OwnedBy< TextureLayout >
TextureLayout * getOwner () const noexcept
 
void setOwner (TextureLayout &owner) noexcept
 

Friends

class TextureLayout
 
C3D_API castor::String toString () const
 
C3D_API bool hasBuffer () const
 
C3D_API castor::ImageLayout::ConstBuffer getBuffer () const
 
C3D_API castor::ImageLayout::Buffer getBuffer ()
 
C3D_API uint32_t getLevelCount () const
 
C3D_API ashes::ImageView const & getSampledView () const
 
C3D_API ashes::ImageView const & getTargetView () const
 
uint32_t getIndex () const
 
VkImageSubresourceRange const & getSubresourceRange () const
 
uint32_t getBaseMipLevel () const
 
void setMipmapsGenerationNeeded (bool value)
 
bool isMipmapsGenerationNeeded () const
 
bool needsYInversion () const
 
bool needsXInversion () const
 
bool needsZInversion () const
 
static VkImageViewCreateInfo convertToSampledView (VkImageViewCreateInfo createInfo)
 
static VkImageViewCreateInfo convertToTargetView (VkImageViewCreateInfo createInfo, uint32_t depth)
 

Additional Inherited Members

- Protected Member Functions inherited from castor::OwnedBy< TextureLayout >
 OwnedBy (TextureLayout &owner) noexcept
 Constructor.
 

Constructor & Destructor Documentation

◆ TextureView()

C3D_API castor3d::TextureView::TextureView ( TextureLayout & layout,
ashes::ImageViewCreateInfo info,
uint32_t index,
castor::String debugName )

Constructor.

Parameters
[in]layoutThe parent layout.
[in]infoThe creation info.
[in]indexThe image index in its layout.
[in]debugNameThe debug name for this layout.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::TextureView::cleanup ( )

Cleans up the view.

◆ convertToSampledView()

static VkImageViewCreateInfo castor3d::TextureView::convertToSampledView ( VkImageViewCreateInfo createInfo)
static

◆ convertToTargetView()

static VkImageViewCreateInfo castor3d::TextureView::convertToTargetView ( VkImageViewCreateInfo createInfo,
uint32_t depth )
static

◆ getBaseMipLevel()

uint32_t castor3d::TextureView::getBaseMipLevel ( ) const
inline

◆ getBuffer() [1/2]

C3D_API castor::ImageLayout::Buffer castor3d::TextureView::getBuffer ( )

◆ getBuffer() [2/2]

C3D_API castor::ImageLayout::ConstBuffer castor3d::TextureView::getBuffer ( ) const

◆ getIndex()

uint32_t castor3d::TextureView::getIndex ( ) const
inline

◆ getLevelCount()

C3D_API uint32_t castor3d::TextureView::getLevelCount ( ) const

◆ getSampledView()

C3D_API ashes::ImageView const & castor3d::TextureView::getSampledView ( ) const

◆ getSubresourceRange()

VkImageSubresourceRange const & castor3d::TextureView::getSubresourceRange ( ) const
inline

◆ getTargetView()

C3D_API ashes::ImageView const & castor3d::TextureView::getTargetView ( ) const

◆ hasBuffer()

C3D_API bool castor3d::TextureView::hasBuffer ( ) const

◆ initialise()

C3D_API bool castor3d::TextureView::initialise ( )

Initialises the view.

Returns
true if inverted.

◆ isMipmapsGenerationNeeded()

bool castor3d::TextureView::isMipmapsGenerationNeeded ( ) const
inline

◆ needsXInversion()

bool castor3d::TextureView::needsXInversion ( ) const
inline

◆ needsYInversion()

bool castor3d::TextureView::needsYInversion ( ) const
inline

◆ needsZInversion()

bool castor3d::TextureView::needsZInversion ( ) const
inline

◆ setMipmapsGenerationNeeded()

void castor3d::TextureView::setMipmapsGenerationNeeded ( bool value)
inline

◆ toString()

C3D_API castor::String castor3d::TextureView::toString ( ) const

name Getters.

◆ update() [1/2]

C3D_API void castor3d::TextureView::update ( VkExtent3D const & extent,
VkFormat format,
uint32_t mipLevels,
uint32_t arrayLayers )

Updates the view range.

Parameters
[in]extentThe extent.
[in]formatThe pixel format.
[in]mipLevelsThe miplevel count.
[in]arrayLayersThe layer count.

◆ update() [2/2]

C3D_API void castor3d::TextureView::update ( VkImage image,
uint32_t baseArrayLayer,
uint32_t layerCount,
uint32_t baseMipLevel,
uint32_t levelCount )

Updates the view range.

Parameters
[in]imageThe GPU image.
[in]baseArrayLayerThe starting layer.
[in]layerCountThe layer count.
[in]baseMipLevelThe starting miplevel.
[in]levelCountThe miplevel count.

Friends And Related Symbol Documentation

◆ TextureLayout

friend class TextureLayout
friend

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