Vireo  0.0
Vireo 3D Rendering Hardware Interface
Image Class Reference

Detailed Description

An image object

Manual page : Images

Public Member Functions

auto getFormat () const
 
auto getWidth () const
 
auto getHeight () const
 
auto getMipLevels () const
 
auto getArraySize () const
 
uint32_t getRowPitch (uint32_t mipLevel=0) const
 
uint32_t getRowLength (uint32_t mipLevel=0) const
 
auto getImageSize (const uint32_t mipLevel=0) const
 
auto getAlignedImageSize (const uint32_t mipLevel=0) const
 
uint32_t getAlignedRowPitch (const uint32_t mipLevel=0) const
 
uint32_t getAlignedRowLength (const uint32_t mipLevel=0) const
 
auto isReadWrite () const
 
virtual ~Image () = default
 
 Image (Image &) = delete
 
Image & operator= (const Image &) = delete
 

Static Public Member Functions

static auto getPixelSize (const ImageFormat format)
 
static auto getMemoryAllocations ()
 

Static Public Attributes

static constexpr uint8_t pixelSize []
 
static constexpr uint32_t IMAGE_ROW_PITCH_ALIGNMENT {256}
 

Protected Member Functions

 Image (const ImageFormat format, const uint32_t width, const uint32_t height, const uint32_t mipLevels, const uint32_t arraySize, const bool isReadWrite)
 

Static Protected Attributes

static std::mutex memoryAllocationsMutex
 
static std::list< VideoMemoryAllocationDescmemoryAllocations
 

Constructor & Destructor Documentation

virtual ~Image ( )
virtualdefault
Image ( Image &  )
delete
Image ( const ImageFormat  format,
const uint32_t  width,
const uint32_t  height,
const uint32_t  mipLevels,
const uint32_t  arraySize,
const bool  isReadWrite 
)
inlineprotected

Member Function Documentation

auto getAlignedImageSize ( const uint32_t  mipLevel = 0) const
inline

Return the aligned size in bytes for a level

uint32_t getAlignedRowLength ( const uint32_t  mipLevel = 0) const
inline

Return the size in pixels of aligned rows for a mip level

uint32_t getAlignedRowPitch ( const uint32_t  mipLevel = 0) const
inline

Return the size in bytes of aligned rows for a mip level

auto getArraySize ( ) const
inline

Returns the number of layers

auto getFormat ( ) const
inline

Returns the pixel format

auto getHeight ( ) const
inline

Returns the height of the first layer in pixels

auto getImageSize ( const uint32_t  mipLevel = 0) const
inline

Return the size in bytes

static auto getMemoryAllocations ( )
inlinestatic

Returns the currently allocated images. Only available if isMemoryUsageEnabled() is true

auto getMipLevels ( ) const
inline

Returns the number of mips levels

static auto getPixelSize ( const ImageFormat  format)
inlinestatic

Returns the number of bytes for one pixel, or the block size in bytes pour BCn compressed formats

uint32_t getRowLength ( uint32_t  mipLevel = 0) const

Return the size in pixels of each row for a mip level

uint32_t getRowPitch ( uint32_t  mipLevel = 0) const

Return the size in bytes of each row for a mip level

auto getWidth ( ) const
inline

Returns the width of the first layer in pixels

auto isReadWrite ( ) const
inline

Return true if the image have read/write access

Image& operator= ( const Image &  )
delete

Member Data Documentation

constexpr uint32_t IMAGE_ROW_PITCH_ALIGNMENT {256}
staticconstexpr

Row pitch alignment in bytes for cross-API compatibility. Always use this alignment before using copy methods to have the same alignment with DirectX and Vulkan.

std::list<VideoMemoryAllocationDesc> memoryAllocations
staticprotected
std::mutex memoryAllocationsMutex
staticprotected
constexpr uint8_t pixelSize[]
staticconstexpr