Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Assets::Textures::Ktx2TextureData Struct Reference

Stores all data loaded from a KTX2 file including mip chain. More...

#include <Ktx2Loader.h>

Collaboration diagram for Engine::Assets::Textures::Ktx2TextureData:

Public Member Functions

const uint8_t * bytes () const
 Returns the contiguous image bytes, whether owned or externally held.
bool hasBytes () const
 Returns true when image bytes are available.
void releaseBytes ()
 Releases owned and externally held image bytes.

Public Attributes

uint32_t baseWidth = 0
 Width of mip level 0 in this data object.
uint32_t baseHeight = 0
 Height of mip level 0 in this data object.
uint32_t sourceWidth = 0
 Width of the original source texture before mip extraction.
uint32_t sourceHeight = 0
 Height of the original source texture before mip extraction.
VkFormat vkFormat = VK_FORMAT_UNDEFINED
 Vulkan format used for upload.
uint32_t mipLevels = 0
 Number of mip levels stored in this data object.
uint32_t sourceMipLevels = 0
 Number of mip levels in the original source texture.
uint32_t sourceBaseMip = 0
 Source mip index represented by local mip level 0.
bool isCompressed = false
 True when the format uses block compression.
std::vector< uint8_t > allData
 Owned contiguous image bytes.
std::shared_ptr< void > externalDataOwner
 Owner that keeps externalData alive.
const uint8_t * externalData = nullptr
 Borrowed image bytes from an external owner.
std::vector< VkDeviceSize > mipOffsets
 Byte offset for each local mip level.
std::vector< VkDeviceSize > mipSizes
 Byte size for each local mip level.
std::vector< uint32_t > mipWidths
 Width for each local mip level.
std::vector< uint32_t > mipHeights
 Height for each local mip level.
std::string uri
 Source URI or filename used for diagnostics.

Detailed Description

Stores all data loaded from a KTX2 file including mip chain.

Definition at line 16 of file Ktx2Loader.h.

Member Function Documentation

◆ bytes()

const uint8_t * Engine::Assets::Textures::Ktx2TextureData::bytes ( ) const
inlinenodiscard

Returns the contiguous image bytes, whether owned or externally held.

Definition at line 38 of file Ktx2Loader.h.

References allData, and externalData.

◆ hasBytes()

bool Engine::Assets::Textures::Ktx2TextureData::hasBytes ( ) const
inlinenodiscard

Returns true when image bytes are available.

Definition at line 46 of file Ktx2Loader.h.

References allData, and externalData.

◆ releaseBytes()

void Engine::Assets::Textures::Ktx2TextureData::releaseBytes ( )
inline

Releases owned and externally held image bytes.

Definition at line 54 of file Ktx2Loader.h.

References allData, externalData, and externalDataOwner.

Member Data Documentation

◆ allData

std::vector<uint8_t> Engine::Assets::Textures::Ktx2TextureData::allData

Owned contiguous image bytes.

Definition at line 26 of file Ktx2Loader.h.

Referenced by bytes(), hasBytes(), and releaseBytes().

◆ baseHeight

uint32_t Engine::Assets::Textures::Ktx2TextureData::baseHeight = 0

Height of mip level 0 in this data object.

Definition at line 18 of file Ktx2Loader.h.

◆ baseWidth

uint32_t Engine::Assets::Textures::Ktx2TextureData::baseWidth = 0

Width of mip level 0 in this data object.

Definition at line 17 of file Ktx2Loader.h.

◆ externalData

const uint8_t* Engine::Assets::Textures::Ktx2TextureData::externalData = nullptr

Borrowed image bytes from an external owner.

Definition at line 28 of file Ktx2Loader.h.

Referenced by bytes(), hasBytes(), and releaseBytes().

◆ externalDataOwner

std::shared_ptr<void> Engine::Assets::Textures::Ktx2TextureData::externalDataOwner

Owner that keeps externalData alive.

Definition at line 27 of file Ktx2Loader.h.

Referenced by releaseBytes().

◆ isCompressed

bool Engine::Assets::Textures::Ktx2TextureData::isCompressed = false

True when the format uses block compression.

Definition at line 25 of file Ktx2Loader.h.

◆ mipHeights

std::vector<uint32_t> Engine::Assets::Textures::Ktx2TextureData::mipHeights

Height for each local mip level.

Definition at line 32 of file Ktx2Loader.h.

◆ mipLevels

uint32_t Engine::Assets::Textures::Ktx2TextureData::mipLevels = 0

Number of mip levels stored in this data object.

Definition at line 22 of file Ktx2Loader.h.

◆ mipOffsets

std::vector<VkDeviceSize> Engine::Assets::Textures::Ktx2TextureData::mipOffsets

Byte offset for each local mip level.

Definition at line 29 of file Ktx2Loader.h.

◆ mipSizes

std::vector<VkDeviceSize> Engine::Assets::Textures::Ktx2TextureData::mipSizes

Byte size for each local mip level.

Definition at line 30 of file Ktx2Loader.h.

◆ mipWidths

std::vector<uint32_t> Engine::Assets::Textures::Ktx2TextureData::mipWidths

Width for each local mip level.

Definition at line 31 of file Ktx2Loader.h.

◆ sourceBaseMip

uint32_t Engine::Assets::Textures::Ktx2TextureData::sourceBaseMip = 0

Source mip index represented by local mip level 0.

Definition at line 24 of file Ktx2Loader.h.

◆ sourceHeight

uint32_t Engine::Assets::Textures::Ktx2TextureData::sourceHeight = 0

Height of the original source texture before mip extraction.

Definition at line 20 of file Ktx2Loader.h.

◆ sourceMipLevels

uint32_t Engine::Assets::Textures::Ktx2TextureData::sourceMipLevels = 0

Number of mip levels in the original source texture.

Definition at line 23 of file Ktx2Loader.h.

◆ sourceWidth

uint32_t Engine::Assets::Textures::Ktx2TextureData::sourceWidth = 0

Width of the original source texture before mip extraction.

Definition at line 19 of file Ktx2Loader.h.

◆ uri

std::string Engine::Assets::Textures::Ktx2TextureData::uri

Source URI or filename used for diagnostics.

Definition at line 33 of file Ktx2Loader.h.

◆ vkFormat

VkFormat Engine::Assets::Textures::Ktx2TextureData::vkFormat = VK_FORMAT_UNDEFINED

Vulkan format used for upload.

Definition at line 21 of file Ktx2Loader.h.


The documentation for this struct was generated from the following file:
  • /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Texture/Ktx2Loader.h