3#include <CesiumGltf/Ktx2TranscodeTargets.h>
4#include <CesiumGltf/Library.h>
5#include <CesiumUtility/SharedAsset.h>
128 return this->sizeBytes >= 0 ? this->sizeBytes
129 :
static_cast<int64_t
>(this->pixelData.size());
An asset that is potentially shared between multiple objects, such as an image shared between multipl...
Classes for working with glTF models.
GpuCompressedPixelFormat
Supported GPU compressed pixel formats.
@ NONE
The data is uncompressed.
The byte range within a buffer where this mip exists.
size_t byteOffset
The byte index where this mip begins.
size_t byteSize
The size in bytes of this mip.
int64_t sizeBytes
The effective size of this image, in bytes, for estimating resource usage for caching purposes.
int32_t bytesPerChannel
The number of bytes per channel.
int32_t height
The height of the image in pixels.
std::vector< ImageAssetMipPosition > mipPositions
The offset of each mip in the pixel data.
ImageAsset()=default
Constructs an empty image asset.
int64_t getSizeBytes() const
Gets the size of this asset, in bytes.
int32_t width
The width of the image in pixels.
int32_t channels
The number of channels per pixel.
GpuCompressedPixelFormat compressedPixelFormat
The gpu compressed pixel format for this image or NONE if it is not compressed.
std::vector< std::byte > pixelData
The pixel data.