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

#include <TextureLayout.hpp>

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

Public Member Functions

C3D_API TextureLayout (RenderSystem &renderSystem, ashes::ImageCreateInfo info, VkMemoryPropertyFlags memoryProperties, castor::String const &debugName, bool isStatic=false)
 Constructor.
 
C3D_API TextureLayout (RenderSystem &renderSystem, castor::String const &name, VkImage image, crg::ImageViewId imageView)
 Constructor.
 
C3D_API TextureLayout (RenderSystem &renderSystem, ashes::ImagePtr image, VkImageCreateInfo const &createInfo)
 Constructor.
 
C3D_API bool initialise (RenderDevice const &device)
 Initialises the texture and all its views.
 
C3D_API void upload (UploadData &uploader)
 Uploads image data to the texture buffer.
 
C3D_API void cleanup ()
 Cleans up the texture and all its views.
 
C3D_API void generateMipmaps (RenderDevice const &device, VkImageLayout srcLayout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) const
 Generate texture mipmaps.
 
C3D_API void generateMipmaps (QueueData const &queueData, VkImageLayout srcLayout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) const
 Generate texture mipmaps.
 
C3D_API void generateMipmaps (ashes::CommandBuffer const &cmd, VkImageLayout srcLayout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) const
 Generate texture mipmaps.
 
Texture source setup.
C3D_API void setSource (castor::PxBufferBaseUPtr buffer, uint32_t bufferOrigLevels, bool isStatic=false)
 Sets the whole layout source.
 
C3D_API void setSource (castor::PxBufferBaseUPtr buffer, bool isStatic=false)
 
C3D_API void setSource (castor::Path const &folder, castor::Path const &relative)
 
C3D_API void setSource (VkExtent3D const &extent, VkFormat format)
 
void setSource (VkExtent2D const &extent, VkFormat format)
 
Getters.
C3D_API castor::String getDefaultSourceString () const
 
C3D_API ashes::ImageView const & getDefaultSampledView () const noexcept
 
C3D_API ashes::ImageView const & getDefaultTargetView () const noexcept
 
C3D_API castor::String getLayerCubeSourceString (size_t layer) const noexcept
 
C3D_API ashes::ImageView const & getLayerCubeTargetView (size_t layer) const noexcept
 
C3D_API castor::String getLayerCubeFaceSourceString (size_t layer, CubeMapFace face) const noexcept
 
C3D_API ashes::ImageView const & getLayerCubeFaceTargetView (size_t layer, CubeMapFace face) const noexcept
 
C3D_API castor::String getName () const
 
C3D_API castor::Path getPath () const
 
C3D_API bool needsYInversion () const
 
C3D_API bool hasBuffer () const
 
uint32_t getLayersCount () const noexcept
 
uint32_t isCube () const noexcept
 
bool isInitialised () const noexcept
 
bool isStatic () const noexcept
 
VkImageType getType () const noexcept
 
castor::Image const & getImage () const noexcept
 
castor::ImagegetImage () noexcept
 
ashes::Image const & getTexture () const noexcept
 
ashes::ImageCreateInfo const & getCreateInfo () const noexcept
 
uint32_t getWidth () const noexcept
 
uint32_t getHeight () const noexcept
 
uint32_t getDepth () const noexcept
 
uint32_t getMipLevels () const noexcept
 
VkExtent3D const & getDimensions () const noexcept
 
VkFormat getPixelFormat () const noexcept
 
- Public Member Functions inherited from castor::OwnedBy< RenderSystem >
RenderSystem * getOwner () const
 

Friends

class TextureView
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ TextureLayout() [1/3]

C3D_API castor3d::TextureLayout::TextureLayout ( RenderSystem & renderSystem,
ashes::ImageCreateInfo info,
VkMemoryPropertyFlags memoryProperties,
castor::String const & debugName,
bool isStatic = false )

Constructor.

Parameters
[in]renderSystemThe render system.
[in]infoThe image informations.
[in]memoryPropertiesThe required memory properties.
[in]debugNameThe debug name for this layout.
[in]isStaticTells if this layout is static.

◆ TextureLayout() [2/3]

C3D_API castor3d::TextureLayout::TextureLayout ( RenderSystem & renderSystem,
castor::String const & name,
VkImage image,
crg::ImageViewId imageView )

Constructor.

Parameters
[in]renderSystemThe render system.
[in]nameThe debug name for this layout.
[in]imageThe image.
[in]imageViewThe image view.

◆ TextureLayout() [3/3]

C3D_API castor3d::TextureLayout::TextureLayout ( RenderSystem & renderSystem,
ashes::ImagePtr image,
VkImageCreateInfo const & createInfo )

Constructor.

Parameters
[in]renderSystemThe render system.
[in]imageThe image.
[in]createInfoThe image informations.

Member Function Documentation

◆ cleanup()

C3D_API void castor3d::TextureLayout::cleanup ( )

Cleans up the texture and all its views.

◆ generateMipmaps() [1/3]

C3D_API void castor3d::TextureLayout::generateMipmaps ( ashes::CommandBuffer const & cmd,
VkImageLayout srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) const

Generate texture mipmaps.

Parameters
[in]cmdThe command buffer recording the commands.
[in]srcLayoutThe current layout of the image.

◆ generateMipmaps() [2/3]

C3D_API void castor3d::TextureLayout::generateMipmaps ( QueueData const & queueData,
VkImageLayout srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) const

Generate texture mipmaps.

Parameters
[in]queueDataThe queue receiving the GPU commands.
[in]srcLayoutThe current layout of the image.

◆ generateMipmaps() [3/3]

C3D_API void castor3d::TextureLayout::generateMipmaps ( RenderDevice const & device,
VkImageLayout srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) const

Generate texture mipmaps.

Parameters
[in]deviceThe GPU device.
[in]srcLayoutThe current layout of the image.

◆ getCreateInfo()

ashes::ImageCreateInfo const & castor3d::TextureLayout::getCreateInfo ( ) const
inlinenoexcept

◆ getDefaultSampledView()

C3D_API ashes::ImageView const & castor3d::TextureLayout::getDefaultSampledView ( ) const
noexcept

◆ getDefaultSourceString()

C3D_API castor::String castor3d::TextureLayout::getDefaultSourceString ( ) const

◆ getDefaultTargetView()

C3D_API ashes::ImageView const & castor3d::TextureLayout::getDefaultTargetView ( ) const
noexcept

◆ getDepth()

uint32_t castor3d::TextureLayout::getDepth ( ) const
inlinenoexcept

◆ getDimensions()

VkExtent3D const & castor3d::TextureLayout::getDimensions ( ) const
inlinenoexcept

◆ getHeight()

uint32_t castor3d::TextureLayout::getHeight ( ) const
inlinenoexcept

◆ getImage() [1/2]

castor::Image const & castor3d::TextureLayout::getImage ( ) const
inlinenoexcept

◆ getImage() [2/2]

castor::Image & castor3d::TextureLayout::getImage ( )
inlinenoexcept

◆ getLayerCubeFaceSourceString()

C3D_API castor::String castor3d::TextureLayout::getLayerCubeFaceSourceString ( size_t layer,
CubeMapFace face ) const
noexcept

◆ getLayerCubeFaceTargetView()

C3D_API ashes::ImageView const & castor3d::TextureLayout::getLayerCubeFaceTargetView ( size_t layer,
CubeMapFace face ) const
noexcept

◆ getLayerCubeSourceString()

C3D_API castor::String castor3d::TextureLayout::getLayerCubeSourceString ( size_t layer) const
noexcept

◆ getLayerCubeTargetView()

C3D_API ashes::ImageView const & castor3d::TextureLayout::getLayerCubeTargetView ( size_t layer) const
noexcept

◆ getLayersCount()

uint32_t castor3d::TextureLayout::getLayersCount ( ) const
inlinenoexcept

Referenced by isCube().

Here is the caller graph for this function:

◆ getMipLevels()

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

◆ getName()

C3D_API castor::String castor3d::TextureLayout::getName ( ) const

◆ getPath()

C3D_API castor::Path castor3d::TextureLayout::getPath ( ) const

◆ getPixelFormat()

VkFormat castor3d::TextureLayout::getPixelFormat ( ) const
inlinenoexcept

◆ getTexture()

ashes::Image const & castor3d::TextureLayout::getTexture ( ) const
inlinenoexcept

References CU_Require.

◆ getType()

VkImageType castor3d::TextureLayout::getType ( ) const
inlinenoexcept

◆ getWidth()

uint32_t castor3d::TextureLayout::getWidth ( ) const
inlinenoexcept

◆ hasBuffer()

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

◆ initialise()

C3D_API bool castor3d::TextureLayout::initialise ( RenderDevice const & device)

Initialises the texture and all its views.

Parameters
[in]deviceThe GPU device.
Returns
true if OK.

◆ isCube()

uint32_t castor3d::TextureLayout::isCube ( ) const
inlinenoexcept

References getLayersCount().

Here is the call graph for this function:

◆ isInitialised()

bool castor3d::TextureLayout::isInitialised ( ) const
inlinenoexcept

◆ isStatic()

bool castor3d::TextureLayout::isStatic ( ) const
inlinenoexcept

◆ needsYInversion()

C3D_API bool castor3d::TextureLayout::needsYInversion ( ) const

◆ setSource() [1/5]

C3D_API void castor3d::TextureLayout::setSource ( castor::Path const & folder,
castor::Path const & relative )

◆ setSource() [2/5]

C3D_API void castor3d::TextureLayout::setSource ( castor::PxBufferBaseUPtr buffer,
bool isStatic = false )

◆ setSource() [3/5]

C3D_API void castor3d::TextureLayout::setSource ( castor::PxBufferBaseUPtr buffer,
uint32_t bufferOrigLevels,
bool isStatic = false )

Sets the whole layout source.

Referenced by setSource().

Here is the caller graph for this function:

◆ setSource() [4/5]

void castor3d::TextureLayout::setSource ( VkExtent2D const & extent,
VkFormat format )
inline

References setSource().

Here is the call graph for this function:

◆ setSource() [5/5]

C3D_API void castor3d::TextureLayout::setSource ( VkExtent3D const & extent,
VkFormat format )

◆ upload()

C3D_API void castor3d::TextureLayout::upload ( UploadData & uploader)

Uploads image data to the texture buffer.

Friends And Related Symbol Documentation

◆ TextureView

friend class TextureView
friend

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