![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <TextureView.hpp>
Public Member Functions | |
C3D_API | TextureView (TextureLayout &layout, ashes::ImageViewCreateInfo info, uint32_t index, castor::String debugName) |
Constructor. More... | |
C3D_API bool | initialise () |
Initialises the view. More... | |
C3D_API void | update (VkImage image, uint32_t baseArrayLayer, uint32_t layerCount, uint32_t baseMipLevel, uint32_t levelCount) |
Updates the view range. More... | |
C3D_API void | update (VkExtent3D const &extent, VkFormat format, uint32_t mipLevels, uint32_t arrayLayers) |
Updates the view range. More... | |
C3D_API void | cleanup () |
Cleans up the view. More... | |
Friends | |
class | TextureLayout |
C3D_API castor::String | toString () const |
C3D_API bool | hasBuffer () const |
C3D_API castor::ImageLayout::ConstBuffer | getBuffer () const |
C3D_API castor::ImageLayout::Buffer | getBuffer () |
C3D_API uint32_t | getLevelCount () const |
C3D_API ashes::ImageView const & | getSampledView () const |
C3D_API ashes::ImageView const & | getTargetView () const |
uint32_t | getIndex () const |
VkImageSubresourceRange const & | getSubresourceRange () const |
uint32_t | getBaseMipLevel () const |
void | setMipmapsGenerationNeeded (bool value) |
bool | isMipmapsGenerationNeeded () const |
bool | needsYInversion () const |
static VkImageViewCreateInfo | convertToSampledView (VkImageViewCreateInfo createInfo) |
static VkImageViewCreateInfo | convertToTargetView (VkImageViewCreateInfo createInfo, uint32_t depth) |
C3D_API castor3d::TextureView::TextureView | ( | TextureLayout & | layout, |
ashes::ImageViewCreateInfo | info, | ||
uint32_t | index, | ||
castor::String | debugName | ||
) |
Constructor.
[in] | layout | The parent layout. |
[in] | info | The creation info. |
[in] | index | The image index in its layout. |
[in] | debugName | The debug name for this layout. |
C3D_API void castor3d::TextureView::cleanup | ( | ) |
Cleans up the view.
|
static |
|
static |
|
inline |
C3D_API castor::ImageLayout::Buffer castor3d::TextureView::getBuffer | ( | ) |
C3D_API castor::ImageLayout::ConstBuffer castor3d::TextureView::getBuffer | ( | ) | const |
|
inline |
C3D_API uint32_t castor3d::TextureView::getLevelCount | ( | ) | const |
C3D_API ashes::ImageView const & castor3d::TextureView::getSampledView | ( | ) | const |
|
inline |
C3D_API ashes::ImageView const & castor3d::TextureView::getTargetView | ( | ) | const |
C3D_API bool castor3d::TextureView::hasBuffer | ( | ) | const |
C3D_API bool castor3d::TextureView::initialise | ( | ) |
Initialises the view.
true
if inverted.
|
inline |
|
inline |
|
inline |
C3D_API castor::String castor3d::TextureView::toString | ( | ) | const |
name Getters.
C3D_API void castor3d::TextureView::update | ( | VkExtent3D const & | extent, |
VkFormat | format, | ||
uint32_t | mipLevels, | ||
uint32_t | arrayLayers | ||
) |
Updates the view range.
[in] | extent | The extent. |
[in] | format | The pixel format. |
[in] | mipLevels | The miplevel count. |
[in] | arrayLayers | The layer count. |
C3D_API void castor3d::TextureView::update | ( | VkImage | image, |
uint32_t | baseArrayLayer, | ||
uint32_t | layerCount, | ||
uint32_t | baseMipLevel, | ||
uint32_t | levelCount | ||
) |
Updates the view range.
[in] | image | The GPU image. |
[in] | baseArrayLayer | The starting layer. |
[in] | layerCount | The layer count. |
[in] | baseMipLevel | The starting miplevel. |
[in] | levelCount | The miplevel count. |
|
friend |