Texture load attributes. Selects encoded bytes, supplied mip levels, or a URI source. More...
#include <RadientAssets.h>
Public Attributes | |
| const Char * | URI = nullptr |
| const Char * | BaseURI = nullptr |
| IRadientDataBlob * | pDataBlob = nullptr |
| const RadientTextureData * | pTextureData = nullptr |
| Bool | IsSRGB = False |
| Interpret the texture as sRGB. | |
Texture load attributes. Selects encoded bytes, supplied mip levels, or a URI source.
| const Char* Diligent::RadientTextureLoadInfo::BaseURI = nullptr |
Optional URI of the asset that references URI. Relative URI sources are resolved against this value by the active asset resolver.
| IRadientDataBlob* Diligent::RadientTextureLoadInfo::pDataBlob = nullptr |
Optional blob containing the complete encoded texture, starting at byte zero. Encoded BC textures require mip 0 width and height to be multiples of four; otherwise loading fails with RADIENT_STATUS_UNSUPPORTED. Smaller mip levels may have dimensions below four. Accepts read-only or mutable blobs. The blob must be non-empty and its size must fit in size_t. Mutually exclusive with pTextureData. Radient retains the blob and acquires read access during LoadTexture(), before returning. The data pointer and size are checked within this read scope. The encoded bytes are consumed directly; LoadTexture() does not copy them. Read access remains active until Radient no longer needs the source bytes, including any decoder references used during upload preparation. The caller may release its blob reference after LoadTexture() returns. For REFERENCE storage, the caller keeps the referenced bytes alive and unchanged throughout the blob's lifetime; OnDestroy can release their owner. Other readers may access the blob while Radient is reading it. Mutable blobs cannot be written or resized until all readers finish. Finish any write access before calling LoadTexture(); an active writer causes the call to return RADIENT_STATUS_INVALID_OPERATION without creating a texture asset. If acquiring read access fails, no matching EndRead() or last-reader callback is performed. Once acquired, access is released on completion or failure. OnLastReaderReleased, if set, may run before LoadTexture() returns or later on a worker thread. This notification reports that all readers have finished; it does not indicate GPU upload completion or end the lifetime requirement for REFERENCE storage. See RadientDataBlobCreateInfo for callback details.
| const RadientTextureData* Diligent::RadientTextureLoadInfo::pTextureData = nullptr |
Optional pointer to supplied mip levels, mutually exclusive with pDataBlob. Only 2D texture data is currently supported. Radient preserves all supplied levels and generates the missing tail for uncompressed formats when RadientTextureData::GenerateMips is True. Compressed levels are loaded as supplied. The descriptor and mip array are copied during LoadTexture, and all referenced blobs are retained with read access while their bytes are needed; see RadientTextureMipData::pDataBlob.
| const Char* Diligent::RadientTextureLoadInfo::URI = nullptr |
Source URI. For memory-backed textures, this is optional and may be used as the texture identity for asset cache lookup and debugging.