Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UTexture2D
Description
Retrieve initial texel data for mips, starting from FirstMipToLoad, up to the last mip in the texture. This function will only return mips that are currently loaded, or available via derived data. THIS FUNCTION WILL FAIL if you include in the requested range a streaming mip that is NOT currently loaded. Also note that ALL mip bulk data buffers are discarded (either returned or freed). So... in short, this function should only ever be called once.
| Name | GetInitialMipData |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Texture2D.h |
| Include Path | #include "Engine/Texture2D.h" |
| Source | /Engine/Source/Runtime/Engine/Private/TextureDerivedData.cpp |
virtual bool GetInitialMipData
(
int32 InFirstMipToLoad,
TArrayView < void * > OutMipData,
TArrayView < int64 > OutMipSize
)
true if the requested mip data has been successfully returned.
Parameters
| Name | Remarks |
|---|---|
| FirstMipToLoad | The first mip index to load. |
| OutMipData | A pre-allocated array of pointers, that correspond to [FirstMipToLoad, .... LastMip] Upon successful return, each of those pointers will point to allocated memory containing the corresponding mip's data. Caller takes responsibility to free that memory. |
| OutMipSize | A pre-allocated array of int64, that should be the same size as OutMipData (or zero size if caller does not require the sizes to be returned) Upon successful return, each element contains the size of the corresponding mip's data buffer. |