Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | Public Attributes | List of all members
castor3d::Texture Struct Reference

#include <Texture.hpp>

Collaboration diagram for castor3d::Texture:
Collaboration graph
[legend]

Public Member Functions

C3D_API Texture (Texture const &)=delete
 
C3D_API Textureoperator= (Texture const &)=delete
 
C3D_API Texture (Texture &&rhs) noexcept
 
C3D_API Textureoperator= (Texture &&rhs) noexcept
 
C3D_API Texture ()=default
 
C3D_API Texture (RenderDevice const &device, crg::ResourcesCache &resources, castor::String const &name, VkImageCreateFlags createFlags, VkExtent3D const &size, uint32_t layerCount, uint32_t mipLevels, VkFormat format, VkImageUsageFlags usageFlags, VkBorderColor const &borderColor=VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, VkCompareOp compareOp=VK_COMPARE_OP_NEVER, bool createSubviews=true)
 
C3D_API Texture (RenderDevice const &device, crg::ResourcesCache &resources, castor::String const &name, VkImageCreateFlags createFlags, VkExtent3D const &size, uint32_t layerCount, uint32_t mipLevels, VkFormat format, VkImageUsageFlags usageFlags, VkFilter minFilter, VkFilter magFilter, VkSamplerMipmapMode mipFilter, VkSamplerAddressMode addressMode=VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, VkBorderColor const &borderColor=VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, VkCompareOp compareOp=VK_COMPARE_OP_NEVER, bool createSubviews=true)
 
C3D_API Texture (RenderDevice const &device, crg::ResourcesCache &resources, castor::String const &name, VkImageCreateFlags createFlags, VkExtent3D const &size, uint32_t layerCount, uint32_t mipLevels, VkFormat format, VkImageUsageFlags usageFlags, ashes::Sampler const *sampler, bool createSubviews=true)
 
C3D_API Texture (RenderDevice const &device, crg::ResourcesCache &resources, castor::String const &name, VkImageCreateFlags createFlags, VkExtent3D const &size, uint32_t layerCount, VkSampleCountFlagBits sampleCount, uint32_t mipLevels, VkFormat format, VkImageUsageFlags usageFlags, VkBorderColor const &borderColor=VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, VkCompareOp compareOp=VK_COMPARE_OP_NEVER, bool createSubviews=true)
 
C3D_API Texture (RenderDevice const &device, crg::ResourcesCache &resources, castor::String const &name, VkImageCreateFlags createFlags, VkExtent3D const &size, uint32_t layerCount, VkSampleCountFlagBits sampleCount, uint32_t mipLevels, VkFormat format, VkImageUsageFlags usageFlags, VkFilter minFilter, VkFilter magFilter, VkSamplerMipmapMode mipFilter, VkSamplerAddressMode addressMode=VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, VkBorderColor const &borderColor=VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, VkCompareOp compareOp=VK_COMPARE_OP_NEVER, bool createSubviews=true)
 
C3D_API Texture (RenderDevice const &device, crg::ResourcesCache &resources, castor::String const &name, VkImageCreateFlags createFlags, VkExtent3D const &size, uint32_t layerCount, VkSampleCountFlagBits sampleCount, uint32_t mipLevels, VkFormat format, VkImageUsageFlags usageFlags, ashes::Sampler const *sampler, bool createSubviews=true)
 
C3D_API ~Texture () noexcept
 
C3D_API void create ()
 
C3D_API void destroy () noexcept
 
 operator bool () const noexcept
 
C3D_API VkImageMemoryBarrier makeGeneralLayout (VkImageLayout srcLayout, VkAccessFlags dstAccessFlags, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeTransferDestination (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeTransferSource (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeShaderInputResource (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeDepthStencilReadOnly (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeColourAttachment (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeDepthStencilAttachment (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makePresentSource (VkImageLayout srcLayout, uint32_t srcQueueFamily=VK_QUEUE_FAMILY_IGNORED, uint32_t dstQueueFamily=VK_QUEUE_FAMILY_IGNORED, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeLayoutTransition (VkImageLayout sourceLayout, VkImageLayout destinationLayout, uint32_t srcQueueFamily, uint32_t dstQueueFamily, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeLayoutTransition (VkImageLayout srcLayout, VkImageLayout dstLayout, VkAccessFlags srcAccessFlags, uint32_t srcQueueFamily, uint32_t dstQueueFamily, bool target=false) const
 
C3D_API VkImageMemoryBarrier makeLayoutTransition (VkImageLayout srcLayout, VkImageLayout dstLayout, VkAccessFlags srcAccessFlags, VkAccessFlags dstAccessMask, uint32_t srcQueueFamily, uint32_t dstQueueFamily, bool target=false) const
 
uint32_t getMipLevels () const noexcept
 
VkFormat getFormat () const noexcept
 
VkExtent3D const & getExtent () const noexcept
 

Public Attributes

crg::ResourcesCache * resources {}
 
RenderDevice const * device {}
 
crg::ImageId imageId {}
 
ashes::ImagePtr image {}
 
crg::ImageViewId wholeViewId {}
 
crg::ImageViewId targetViewId {}
 
crg::ImageViewId sampledViewId {}
 
VkImageView wholeView {}
 
VkImageView targetView {}
 
VkImageView sampledView {}
 
crg::ImageViewIdArray subViewsId {}
 
castor::Vector< VkImageView > subViews {}
 
ashes::Sampler const * sampler {}
 

Constructor & Destructor Documentation

◆ Texture() [1/9]

C3D_API castor3d::Texture::Texture ( Texture const & )
delete

◆ Texture() [2/9]

C3D_API castor3d::Texture::Texture ( Texture && rhs)
noexcept

◆ Texture() [3/9]

C3D_API castor3d::Texture::Texture ( )
default

◆ Texture() [4/9]

C3D_API castor3d::Texture::Texture ( RenderDevice const & device,
crg::ResourcesCache & resources,
castor::String const & name,
VkImageCreateFlags createFlags,
VkExtent3D const & size,
uint32_t layerCount,
uint32_t mipLevels,
VkFormat format,
VkImageUsageFlags usageFlags,
VkBorderColor const & borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
VkCompareOp compareOp = VK_COMPARE_OP_NEVER,
bool createSubviews = true )

◆ Texture() [5/9]

C3D_API castor3d::Texture::Texture ( RenderDevice const & device,
crg::ResourcesCache & resources,
castor::String const & name,
VkImageCreateFlags createFlags,
VkExtent3D const & size,
uint32_t layerCount,
uint32_t mipLevels,
VkFormat format,
VkImageUsageFlags usageFlags,
VkFilter minFilter,
VkFilter magFilter,
VkSamplerMipmapMode mipFilter,
VkSamplerAddressMode addressMode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
VkBorderColor const & borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
VkCompareOp compareOp = VK_COMPARE_OP_NEVER,
bool createSubviews = true )

◆ Texture() [6/9]

C3D_API castor3d::Texture::Texture ( RenderDevice const & device,
crg::ResourcesCache & resources,
castor::String const & name,
VkImageCreateFlags createFlags,
VkExtent3D const & size,
uint32_t layerCount,
uint32_t mipLevels,
VkFormat format,
VkImageUsageFlags usageFlags,
ashes::Sampler const * sampler,
bool createSubviews = true )

◆ Texture() [7/9]

C3D_API castor3d::Texture::Texture ( RenderDevice const & device,
crg::ResourcesCache & resources,
castor::String const & name,
VkImageCreateFlags createFlags,
VkExtent3D const & size,
uint32_t layerCount,
VkSampleCountFlagBits sampleCount,
uint32_t mipLevels,
VkFormat format,
VkImageUsageFlags usageFlags,
VkBorderColor const & borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
VkCompareOp compareOp = VK_COMPARE_OP_NEVER,
bool createSubviews = true )

◆ Texture() [8/9]

C3D_API castor3d::Texture::Texture ( RenderDevice const & device,
crg::ResourcesCache & resources,
castor::String const & name,
VkImageCreateFlags createFlags,
VkExtent3D const & size,
uint32_t layerCount,
VkSampleCountFlagBits sampleCount,
uint32_t mipLevels,
VkFormat format,
VkImageUsageFlags usageFlags,
VkFilter minFilter,
VkFilter magFilter,
VkSamplerMipmapMode mipFilter,
VkSamplerAddressMode addressMode = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
VkBorderColor const & borderColor = VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
VkCompareOp compareOp = VK_COMPARE_OP_NEVER,
bool createSubviews = true )

◆ Texture() [9/9]

C3D_API castor3d::Texture::Texture ( RenderDevice const & device,
crg::ResourcesCache & resources,
castor::String const & name,
VkImageCreateFlags createFlags,
VkExtent3D const & size,
uint32_t layerCount,
VkSampleCountFlagBits sampleCount,
uint32_t mipLevels,
VkFormat format,
VkImageUsageFlags usageFlags,
ashes::Sampler const * sampler,
bool createSubviews = true )

◆ ~Texture()

C3D_API castor3d::Texture::~Texture ( )
noexcept

Member Function Documentation

◆ create()

C3D_API void castor3d::Texture::create ( )

◆ destroy()

C3D_API void castor3d::Texture::destroy ( )
noexcept

◆ getExtent()

VkExtent3D const & castor3d::Texture::getExtent ( ) const
inlinenoexcept

References imageId.

Referenced by castor3d::RenderTechnique::getTargetExtent().

Here is the caller graph for this function:

◆ getFormat()

VkFormat castor3d::Texture::getFormat ( ) const
inlinenoexcept

References imageId.

Referenced by castor3d::RenderTechnique::getTargetFormat().

Here is the caller graph for this function:

◆ getMipLevels()

uint32_t castor3d::Texture::getMipLevels ( ) const
inlinenoexcept

References imageId.

◆ makeColourAttachment()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeColourAttachment ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeDepthStencilAttachment()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeDepthStencilAttachment ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeDepthStencilReadOnly()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeDepthStencilReadOnly ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeGeneralLayout()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeGeneralLayout ( VkImageLayout srcLayout,
VkAccessFlags dstAccessFlags,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeLayoutTransition() [1/3]

C3D_API VkImageMemoryBarrier castor3d::Texture::makeLayoutTransition ( VkImageLayout sourceLayout,
VkImageLayout destinationLayout,
uint32_t srcQueueFamily,
uint32_t dstQueueFamily,
bool target = false ) const

◆ makeLayoutTransition() [2/3]

C3D_API VkImageMemoryBarrier castor3d::Texture::makeLayoutTransition ( VkImageLayout srcLayout,
VkImageLayout dstLayout,
VkAccessFlags srcAccessFlags,
uint32_t srcQueueFamily,
uint32_t dstQueueFamily,
bool target = false ) const

◆ makeLayoutTransition() [3/3]

C3D_API VkImageMemoryBarrier castor3d::Texture::makeLayoutTransition ( VkImageLayout srcLayout,
VkImageLayout dstLayout,
VkAccessFlags srcAccessFlags,
VkAccessFlags dstAccessMask,
uint32_t srcQueueFamily,
uint32_t dstQueueFamily,
bool target = false ) const

◆ makePresentSource()

C3D_API VkImageMemoryBarrier castor3d::Texture::makePresentSource ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeShaderInputResource()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeShaderInputResource ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeTransferDestination()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeTransferDestination ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ makeTransferSource()

C3D_API VkImageMemoryBarrier castor3d::Texture::makeTransferSource ( VkImageLayout srcLayout,
uint32_t srcQueueFamily = VK_QUEUE_FAMILY_IGNORED,
uint32_t dstQueueFamily = VK_QUEUE_FAMILY_IGNORED,
bool target = false ) const

◆ operator bool()

castor3d::Texture::operator bool ( ) const
inlinenoexcept

References device, and resources.

◆ operator=() [1/2]

C3D_API Texture & castor3d::Texture::operator= ( Texture && rhs)
noexcept

◆ operator=() [2/2]

C3D_API Texture & castor3d::Texture::operator= ( Texture const & )
delete

Member Data Documentation

◆ device

RenderDevice const* castor3d::Texture::device {}

Referenced by operator bool().

◆ image

ashes::ImagePtr castor3d::Texture::image {}

◆ imageId

crg::ImageId castor3d::Texture::imageId {}

Referenced by getExtent(), getFormat(), and getMipLevels().

◆ resources

crg::ResourcesCache* castor3d::Texture::resources {}

Referenced by operator bool().

◆ sampledView

VkImageView castor3d::Texture::sampledView {}

◆ sampledViewId

crg::ImageViewId castor3d::Texture::sampledViewId {}

◆ sampler

ashes::Sampler const* castor3d::Texture::sampler {}

◆ subViews

castor::Vector< VkImageView > castor3d::Texture::subViews {}

◆ subViewsId

crg::ImageViewIdArray castor3d::Texture::subViewsId {}

◆ targetView

VkImageView castor3d::Texture::targetView {}

◆ targetViewId

crg::ImageViewId castor3d::Texture::targetViewId {}

◆ wholeView

VkImageView castor3d::Texture::wholeView {}

◆ wholeViewId

crg::ImageViewId castor3d::Texture::wholeViewId {}

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