Diligent Engine
Loading...
Searching...
No Matches
Diligent::RadientTextureLoadInfoX Class Reference

#include <RadientTypesX.hpp>

Public Member Functions

 RadientTextureLoadInfoX () noexcept=default
 Creates empty load information with the C descriptor defaults.
 RadientTextureLoadInfoX (const RadientTextureLoadInfo &Info)
 Copies metadata, preserving null versus empty URI strings, and retains blobs.
 RadientTextureLoadInfoX (const RadientTextureLoadInfoX &Other)
 Creates an independent metadata copy and shares references to source blobs.
RadientTextureLoadInfoX & operator= (const RadientTextureLoadInfoX &Other)
 Replaces this information with an independent metadata copy.
 RadientTextureLoadInfoX (RadientTextureLoadInfoX &&Other) noexcept
 Transfers ownership and leaves Other at its default state.
RadientTextureLoadInfoX & operator= (RadientTextureLoadInfoX &&Other) noexcept
 Transfers ownership. Other becomes default-initialized; self-move is a no-op.
RadientTextureLoadInfoX & SetURI (const Char *URI)
 Copies URI; nullptr clears it. Supplied data is preserved because URI may identify it.
RadientTextureLoadInfoX & SetURI (const std::string &URI)
 Copies a URI string, including an empty string.
RadientTextureLoadInfoX & SetBaseURI (const Char *BaseURI)
 Copies BaseURI; nullptr clears it. Source data and URI are preserved.
RadientTextureLoadInfoX & SetBaseURI (const std::string &BaseURI)
 Copies a base URI string, including an empty string.
RadientTextureLoadInfoX & SetDataBlob (IRadientDataBlob *pBlob) noexcept
RadientTextureLoadInfoX & SetTextureData (const RadientTextureData &Data)
RadientTextureLoadInfoX & SetTextureData (RadientTextureDataX &&Data) noexcept
RadientTextureLoadInfoX & SetEncodedTextureSRGB (Bool EncodedTextureIsSRGB) noexcept
RadientTextureLoadInfoX & ClearSourceData () noexcept
 Releases both data sources while preserving URI, BaseURI, and loading options.
const RadientTextureLoadInfo & Get () const noexcept
 Returns the C descriptor view without allocating or acquiring blob access.
 operator const RadientTextureLoadInfo & () const noexcept
 Allows passing this wrapper directly to LoadTexture.
void Clear () noexcept
 Releases all owned metadata and blob references and restores C descriptor defaults.
void Swap (RadientTextureLoadInfoX &Other) noexcept
 Exchanges ownership and repairs both string and nested descriptor pointers.

Detailed Description

Owns texture-loading metadata and retains its source blobs.

URI strings and nested mip descriptors are copied; blobs are retained without copying bytes or acquiring read access. Copies own independent metadata while sharing blobs. Get() and conversion expose a read-only view valid until the wrapper is modified, moved, or destroyed. LoadTexture captures this information during the call, so the wrapper can be discarded afterward. Concurrent access requires synchronization if any access modifies the wrapper.

Member Function Documentation

◆ SetDataBlob()

RadientTextureLoadInfoX & Diligent::RadientTextureLoadInfoX::SetDataBlob ( IRadientDataBlob * pBlob)
inlinenoexcept

Retains an encoded blob and clears supplied mip data, preserving URI and options. Passing nullptr clears both data sources, allowing URI-based loading.

◆ SetEncodedTextureSRGB()

RadientTextureLoadInfoX & Diligent::RadientTextureLoadInfoX::SetEncodedTextureSRGB ( Bool EncodedTextureIsSRGB)
inlinenoexcept

Sets EncodedTextureIsSRGB for encoded input (URI or pDataBlob). Supplied mip data uses RadientTextureData::Format and ignores this option.

◆ SetTextureData() [1/2]

RadientTextureLoadInfoX & Diligent::RadientTextureLoadInfoX::SetTextureData ( const RadientTextureData & Data)
inline

Copies supplied mip metadata, retains its blobs, and clears encoded data. URI, BaseURI, and EncodedTextureIsSRGB are preserved.

◆ SetTextureData() [2/2]

RadientTextureLoadInfoX & Diligent::RadientTextureLoadInfoX::SetTextureData ( RadientTextureDataX && Data)
inlinenoexcept

Transfers supplied mip metadata and blob references, clearing encoded data. Data becomes default-initialized; URI, BaseURI, and EncodedTextureIsSRGB are preserved.