Castor3D 0.15.0
Multiplatform 3D engine
|
#include <TextureLayout.hpp>
Fonctions membres publiques | |
C3D_API | TextureLayout (RenderSystem &renderSystem, ashes::ImageCreateInfo info, VkMemoryPropertyFlags memoryProperties, castor::String debugName, bool isStatic=false) |
Constructeur. | |
C3D_API | TextureLayout (RenderSystem &renderSystem, VkImage image, crg::ImageViewId imageView) |
Constructeur. | |
C3D_API | TextureLayout (RenderSystem &renderSystem, ashes::ImagePtr image, VkImageCreateInfo const &createInfo) |
Constructeur. | |
C3D_API | ~TextureLayout () |
Destructeur. | |
C3D_API bool | initialise (RenderDevice const &device, QueueData const &queueData) |
Initialise la texture et toutes ses vues. | |
C3D_API void | cleanup () |
Nettoie la texture et toutes ses vues. | |
C3D_API void | generateMipmaps (RenderDevice const &device, VkImageLayout srcLayout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) const |
Génère les mipmaps de la texture. | |
C3D_API void | generateMipmaps (QueueData const &queueData, VkImageLayout srcLayout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) const |
Génère les mipmaps de la texture. | |
C3D_API void | generateMipmaps (ashes::CommandBuffer &cmd, VkImageLayout srcLayout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) const |
Génère les mipmaps de la texture. | |
Whole texture access. | |
C3D_API void | setSource (castor::PxBufferBaseUPtr buffer, uint32_t bufferOrigLevels, bool isStatic=false) |
Définit la source de tout le layout. | |
C3D_API void | setSource (castor::PxBufferBaseUPtr buffer, bool isStatic=false) |
C3D_API void | setSource (castor::Path const &folder, castor::Path const &relative, castor::ImageLoaderConfig config={ true, true, true }) |
C3D_API void | setSource (VkExtent3D const &extent, VkFormat format) |
void | setSource (VkExtent2D const &extent, VkFormat format) |
Getters. | |
TextureView const & | getDefaultView () const noexcept |
TextureView & | getDefaultView () noexcept |
MipView const & | getDefault () const noexcept |
uint32_t | getLayersCount () const noexcept |
ArrayView< MipView > const & | getArray2D () const noexcept |
MipView const & | getLayer2D (size_t layer) const noexcept |
MipView & | getLayer2D (size_t layer) noexcept |
TextureView & | getLayer2DView (size_t layer) const noexcept |
2D texture's mip level access. | |
TextureView & | getMipView (size_t level) const noexcept |
Texture array's layer access. | |
C3D_API void | setLayerSource (uint32_t index, castor::PxBufferBaseUPtr buffer, uint32_t bufferOrigLevels) |
Définit la source pour tous les mip levels une couche du layout. | |
C3D_API void | setLayerSource (uint32_t index, castor::PxBufferBaseUPtr buffer) |
C3D_API void | setLayerSource (uint32_t index, castor::Path const &folder, castor::Path const &relative, castor::ImageLoaderConfig config={ true, true, false }) |
C3D_API void | setLayerSource (uint32_t index, VkExtent3D const &extent, VkFormat format) |
void | setLayerSource (uint32_t index, VkExtent2D const &extent, VkFormat format) |
Texture array layer's mip level access. | |
C3D_API void | setLayerMipSource (uint32_t index, uint32_t level, castor::PxBufferBaseUPtr buffer) |
Définit la source pour un mip level d'une couche du layout. | |
C3D_API void | setLayerMipSource (uint32_t index, uint32_t level, castor::Path const &folder, castor::Path const &relative, castor::ImageLoaderConfig config={ true, false, false }) |
C3D_API void | setLayerMipSource (uint32_t index, uint32_t level, VkExtent3D const &extent, VkFormat format) |
void | setLayerMipSource (uint32_t index, uint32_t level, VkExtent2D const &extent, VkFormat format) |
3D texture's slice access. | |
SliceView< MipView > const & | getSlices3D () const noexcept |
MipView const & | getSlice (size_t slice) const noexcept |
MipView & | getSlice (size_t slice) noexcept |
TextureView & | getSliceView (size_t slice) const noexcept |
Cube array's texture access.
| |
uint32_t | isCube () const noexcept |
ArrayView< CubeView > const & | getArrayCube () const noexcept |
CubeView const & | getLayerCube (size_t layer) const noexcept |
CubeView & | getLayerCube (size_t layer) noexcept |
TextureView & | getLayerCubeView (size_t layer) const noexcept |
Cube array texture layer's face access. | |
MipView const & | getLayerCubeFace (size_t layer, CubeMapFace face) const noexcept |
MipView & | getLayerCubeFace (size_t layer, CubeMapFace face) noexcept |
TextureView const & | getLayerCubeFaceView (size_t layer, CubeMapFace face) const noexcept |
C3D_API void | setLayerCubeFaceSource (uint32_t layer, CubeMapFace face, castor::PxBufferBaseUPtr buffer) |
Définit la source pour une face d'un cube d'un tableau dans le layout. | |
C3D_API void | setLayerCubeFaceSource (uint32_t layer, CubeMapFace face, castor::Path const &folder, castor::Path const &relative, castor::ImageLoaderConfig config={ true, true, false }) |
void | setLayerCubeFaceSource (uint32_t layer, CubeMapFace face, VkExtent2D const &extent, VkFormat format) |
Cube array texture layer face's mip level access. | |
TextureView & | getLayerCubeFaceMipView (size_t layer, CubeMapFace face, uint32_t level) const noexcept |
C3D_API void | setLayerCubeFaceMipSource (uint32_t layer, CubeMapFace face, uint32_t level, castor::PxBufferBaseUPtr buffer) |
Définit la source pour un mip level d'une couche du layout. | |
C3D_API void | setLayerCubeFaceMipSource (uint32_t layer, CubeMapFace face, uint32_t level, castor::Path const &folder, castor::Path const &relative, castor::ImageLoaderConfig config={ true, false, false }) |
void | setLayerCubeFaceMipSource (uint32_t layer, CubeMapFace face, uint32_t level, VkExtent2D const &extent, VkFormat format) |
C3D_API castor::String | getName () const |
C3D_API castor::Path | getPath () const |
C3D_API bool | needsYInversion () const |
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 | getMipmapCount () const noexcept |
VkExtent3D const & | getDimensions () const noexcept |
VkFormat | getPixelFormat () const noexcept |
template<typename FuncT > | |
void | forEachView (FuncT function) const |
template<typename FuncT > | |
void | forEachFirstMipView (FuncT function) const |
template<typename FuncT > | |
void | forEachLeafView (FuncT function) const |
Amis | |
class | TextureView |
C3D_API castor3d::TextureLayout::TextureLayout | ( | RenderSystem & | renderSystem, |
ashes::ImageCreateInfo | info, | ||
VkMemoryPropertyFlags | memoryProperties, | ||
castor::String | debugName, | ||
bool | isStatic = false |
||
) |
Constructeur.
[in] | renderSystem | Le render system. |
[in] | info | Les informations de l'image. |
[in] | memoryProperties | Les propriétés requise pour la mémoire. |
[in] | debugName | Le nom de debug pour ce layout. |
[in] | isStatic | Dit si ce layout est statique. |
C3D_API castor3d::TextureLayout::TextureLayout | ( | RenderSystem & | renderSystem, |
VkImage | image, | ||
crg::ImageViewId | imageView | ||
) |
Constructeur.
[in] | renderSystem | Le render system. |
[in] | image | L'image. |
[in] | imageView | La vue sur l'image. |
C3D_API castor3d::TextureLayout::TextureLayout | ( | RenderSystem & | renderSystem, |
ashes::ImagePtr | image, | ||
VkImageCreateInfo const & | createInfo | ||
) |
Constructeur.
[in] | renderSystem | Le render system. |
[in] | image | L'image. |
[in] | createInfo | Les informations de l'image. |
C3D_API castor3d::TextureLayout::~TextureLayout | ( | ) |
Destructeur.
C3D_API void castor3d::TextureLayout::cleanup | ( | ) |
Nettoie la texture et toutes ses vues.
|
inline |
|
inline |
|
inline |
name Parsing des vues.
Références castor3d::MipView::forEachView().
C3D_API void castor3d::TextureLayout::generateMipmaps | ( | ashes::CommandBuffer & | cmd, |
VkImageLayout | srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL |
||
) | const |
Génère les mipmaps de la texture.
[in] | cmd | Le command buffer recevant les commandes. |
[in] | srcLayout | Le layout actuel de l'image. |
C3D_API void castor3d::TextureLayout::generateMipmaps | ( | QueueData const & | queueData, |
VkImageLayout | srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL |
||
) | const |
Génère les mipmaps de la texture.
[in] | queueData | La queue recevant les commandes GPU. |
[in] | srcLayout | Le layout actuel de l'image. |
C3D_API void castor3d::TextureLayout::generateMipmaps | ( | RenderDevice const & | device, |
VkImageLayout | srcLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL |
||
) | const |
Génère les mipmaps de la texture.
[in] | device | Le device GPU. |
[in] | srcLayout | Le layout actuel de l'image. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Références castor3d::MipView::view.
|
inlinenoexcept |
Références castor3d::MipView::view.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Références getLayersCount().
Référencé par getLayer2DView().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Références isCube().
Référencé par getLayerCubeFace(), et getLayerCubeView().
|
inlinenoexcept |
|
inlinenoexcept |
Références castor3d::CubeView::faces, et getLayerCube().
Référencé par getLayerCubeFaceMipView(), et getLayerCubeFaceView().
|
inlinenoexcept |
Références castor3d::CubeView::faces, et getLayerCube().
|
inlinenoexcept |
Références getLayerCubeFace(), et castor3d::MipView::levels.
|
inlinenoexcept |
Références getLayerCubeFace(), et castor3d::MipView::view.
|
inlinenoexcept |
Références getLayerCube(), castor3d::MipView::view, et castor3d::CubeView::view.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Références getDefault(), et castor3d::MipView::levels.
C3D_API castor::String castor3d::TextureLayout::getName | ( | ) | const |
name Getters.
C3D_API castor::Path castor3d::TextureLayout::getPath | ( | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
Références getDepth().
Référencé par getSliceView().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API bool castor3d::TextureLayout::initialise | ( | RenderDevice const & | device, |
QueueData const & | queueData | ||
) |
Initialise la texture et toutes ses vues.
[in] | device | Le device GPU. |
[in] | queueData | La queue recevant les commandes GPU. |
true
si tout s'est bien passé.
|
inlinenoexcept |
Références getLayersCount().
Référencé par getLayerCube().
|
inlinenoexcept |
|
inlinenoexcept |
C3D_API bool castor3d::TextureLayout::needsYInversion | ( | ) | const |
C3D_API void castor3d::TextureLayout::setLayerCubeFaceMipSource | ( | uint32_t | layer, |
CubeMapFace | face, | ||
uint32_t | level, | ||
castor::Path const & | folder, | ||
castor::Path const & | relative, | ||
castor::ImageLoaderConfig | config = { true, false, false } |
||
) |
C3D_API void castor3d::TextureLayout::setLayerCubeFaceMipSource | ( | uint32_t | layer, |
CubeMapFace | face, | ||
uint32_t | level, | ||
castor::PxBufferBaseUPtr | buffer | ||
) |
Définit la source pour un mip level d'une couche du layout.
void castor3d::TextureLayout::setLayerCubeFaceMipSource | ( | uint32_t | layer, |
CubeMapFace | face, | ||
uint32_t | level, | ||
VkExtent2D const & | extent, | ||
VkFormat | format | ||
) |
C3D_API void castor3d::TextureLayout::setLayerCubeFaceSource | ( | uint32_t | layer, |
CubeMapFace | face, | ||
castor::Path const & | folder, | ||
castor::Path const & | relative, | ||
castor::ImageLoaderConfig | config = { true, true, false } |
||
) |
C3D_API void castor3d::TextureLayout::setLayerCubeFaceSource | ( | uint32_t | layer, |
CubeMapFace | face, | ||
castor::PxBufferBaseUPtr | buffer | ||
) |
Définit la source pour une face d'un cube d'un tableau dans le layout.
void castor3d::TextureLayout::setLayerCubeFaceSource | ( | uint32_t | layer, |
CubeMapFace | face, | ||
VkExtent2D const & | extent, | ||
VkFormat | format | ||
) |
C3D_API void castor3d::TextureLayout::setLayerMipSource | ( | uint32_t | index, |
uint32_t | level, | ||
castor::Path const & | folder, | ||
castor::Path const & | relative, | ||
castor::ImageLoaderConfig | config = { true, false, false } |
||
) |
C3D_API void castor3d::TextureLayout::setLayerMipSource | ( | uint32_t | index, |
uint32_t | level, | ||
castor::PxBufferBaseUPtr | buffer | ||
) |
Définit la source pour un mip level d'une couche du layout.
Référencé par setLayerMipSource().
|
inline |
C3D_API void castor3d::TextureLayout::setLayerMipSource | ( | uint32_t | index, |
uint32_t | level, | ||
VkExtent3D const & | extent, | ||
VkFormat | format | ||
) |
C3D_API void castor3d::TextureLayout::setLayerSource | ( | uint32_t | index, |
castor::Path const & | folder, | ||
castor::Path const & | relative, | ||
castor::ImageLoaderConfig | config = { true, true, false } |
||
) |
C3D_API void castor3d::TextureLayout::setLayerSource | ( | uint32_t | index, |
castor::PxBufferBaseUPtr | buffer | ||
) |
C3D_API void castor3d::TextureLayout::setLayerSource | ( | uint32_t | index, |
castor::PxBufferBaseUPtr | buffer, | ||
uint32_t | bufferOrigLevels | ||
) |
Définit la source pour tous les mip levels une couche du layout.
Référencé par setLayerSource().
|
inline |
C3D_API void castor3d::TextureLayout::setLayerSource | ( | uint32_t | index, |
VkExtent3D const & | extent, | ||
VkFormat | format | ||
) |
C3D_API void castor3d::TextureLayout::setSource | ( | castor::Path const & | folder, |
castor::Path const & | relative, | ||
castor::ImageLoaderConfig | config = { true, true, true } |
||
) |
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 |
||
) |
Définit la source de tout le layout.
Référencé par setSource().
|
inline |
C3D_API void castor3d::TextureLayout::setSource | ( | VkExtent3D const & | extent, |
VkFormat | format | ||
) |
|
friend |