Castor3D 0.16.0
Multiplatform 3D engine
|
#include <TextureLayout.hpp>
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::Image & | getImage () 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. | |
C3D_API castor3d::TextureLayout::TextureLayout | ( | RenderSystem & | renderSystem, |
ashes::ImageCreateInfo | info, | ||
VkMemoryPropertyFlags | memoryProperties, | ||
castor::String const & | debugName, | ||
bool | isStatic = false ) |
Constructor.
[in] | renderSystem | The render system. |
[in] | info | The image informations. |
[in] | memoryProperties | The required memory properties. |
[in] | debugName | The debug name for this layout. |
[in] | isStatic | Tells if this layout is static. |
C3D_API castor3d::TextureLayout::TextureLayout | ( | RenderSystem & | renderSystem, |
castor::String const & | name, | ||
VkImage | image, | ||
crg::ImageViewId | imageView ) |
Constructor.
[in] | renderSystem | The render system. |
[in] | name | The debug name for this layout. |
[in] | image | The image. |
[in] | imageView | The image view. |
C3D_API castor3d::TextureLayout::TextureLayout | ( | RenderSystem & | renderSystem, |
ashes::ImagePtr | image, | ||
VkImageCreateInfo const & | createInfo ) |
Constructor.
[in] | renderSystem | The render system. |
[in] | image | The image. |
[in] | createInfo | The image informations. |
C3D_API void castor3d::TextureLayout::cleanup | ( | ) |
Cleans up the texture and all its views.
C3D_API void castor3d::TextureLayout::generateMipmaps | ( | ashes::CommandBuffer const & | cmd, |
VkImageLayout | srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) const |
Generate texture mipmaps.
[in] | cmd | The command buffer recording the commands. |
[in] | srcLayout | The current layout of the image. |
C3D_API void castor3d::TextureLayout::generateMipmaps | ( | QueueData const & | queueData, |
VkImageLayout | srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) const |
Generate texture mipmaps.
[in] | queueData | The queue receiving the GPU commands. |
[in] | srcLayout | The current layout of the image. |
C3D_API void castor3d::TextureLayout::generateMipmaps | ( | RenderDevice const & | device, |
VkImageLayout | srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL ) const |
Generate texture mipmaps.
[in] | device | The GPU device. |
[in] | srcLayout | The current layout of the image. |
|
inlinenoexcept |
|
noexcept |
C3D_API castor::String castor3d::TextureLayout::getDefaultSourceString | ( | ) | const |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API castor::String castor3d::TextureLayout::getName | ( | ) | const |
C3D_API castor::Path castor3d::TextureLayout::getPath | ( | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
References CU_Require.
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API bool castor3d::TextureLayout::hasBuffer | ( | ) | const |
C3D_API bool castor3d::TextureLayout::initialise | ( | RenderDevice const & | device | ) |
Initialises the texture and all its views.
[in] | device | The GPU device. |
true
if OK.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API bool castor3d::TextureLayout::needsYInversion | ( | ) | const |
C3D_API void castor3d::TextureLayout::setSource | ( | castor::Path const & | folder, |
castor::Path const & | relative ) |
C3D_API void castor3d::TextureLayout::setSource | ( | castor::PxBufferBaseUPtr | buffer, |
bool | isStatic = false ) |
C3D_API void castor3d::TextureLayout::setSource | ( | castor::PxBufferBaseUPtr | buffer, |
uint32_t | bufferOrigLevels, | ||
bool | isStatic = false ) |
Sets the whole layout source.
Referenced by setSource().
|
inline |
C3D_API void castor3d::TextureLayout::setSource | ( | VkExtent3D const & | extent, |
VkFormat | format ) |
C3D_API void castor3d::TextureLayout::upload | ( | UploadData & | uploader | ) |
Uploads image data to the texture buffer.
|
friend |