Castor3D 0.16.0
Multiplatform 3D engine
|
#include <Texture.hpp>
Public Member Functions | |
C3D_API | Texture (Texture const &)=delete |
C3D_API Texture & | operator= (Texture const &)=delete |
C3D_API | Texture (Texture &&rhs) noexcept |
C3D_API Texture & | operator= (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 {} |
|
default |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
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 ) |
|
noexcept |
C3D_API void castor3d::Texture::create | ( | ) |
|
noexcept |
|
inlinenoexcept |
References imageId.
Referenced by castor3d::RenderTechnique::getTargetExtent().
|
inlinenoexcept |
References imageId.
Referenced by castor3d::RenderTechnique::getTargetFormat().
|
inlinenoexcept |
References imageId.
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 |
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 |
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 |
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 |
C3D_API VkImageMemoryBarrier castor3d::Texture::makeLayoutTransition | ( | VkImageLayout | sourceLayout, |
VkImageLayout | destinationLayout, | ||
uint32_t | srcQueueFamily, | ||
uint32_t | dstQueueFamily, | ||
bool | target = false ) const |
C3D_API VkImageMemoryBarrier castor3d::Texture::makeLayoutTransition | ( | VkImageLayout | srcLayout, |
VkImageLayout | dstLayout, | ||
VkAccessFlags | srcAccessFlags, | ||
uint32_t | srcQueueFamily, | ||
uint32_t | dstQueueFamily, | ||
bool | target = false ) const |
C3D_API VkImageMemoryBarrier castor3d::Texture::makeLayoutTransition | ( | VkImageLayout | srcLayout, |
VkImageLayout | dstLayout, | ||
VkAccessFlags | srcAccessFlags, | ||
VkAccessFlags | dstAccessMask, | ||
uint32_t | srcQueueFamily, | ||
uint32_t | dstQueueFamily, | ||
bool | target = false ) const |
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 |
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 |
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 |
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 |
RenderDevice const* castor3d::Texture::device {} |
Referenced by operator bool().
ashes::ImagePtr castor3d::Texture::image {} |
crg::ImageId castor3d::Texture::imageId {} |
Referenced by getExtent(), getFormat(), and getMipLevels().
crg::ResourcesCache* castor3d::Texture::resources {} |
Referenced by operator bool().
VkImageView castor3d::Texture::sampledView {} |
crg::ImageViewId castor3d::Texture::sampledViewId {} |
ashes::Sampler const* castor3d::Texture::sampler {} |
castor::Vector< VkImageView > castor3d::Texture::subViews {} |
crg::ImageViewIdArray castor3d::Texture::subViewsId {} |
VkImageView castor3d::Texture::targetView {} |
crg::ImageViewId castor3d::Texture::targetViewId {} |
VkImageView castor3d::Texture::wholeView {} |
crg::ImageViewId castor3d::Texture::wholeViewId {} |