Navigation
API > API/Runtime > API/Runtime/Engine
FTextureResource implementation for streamable 2D textures.
| Name | FTexture2DResource |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Rendering/Texture2DResource.h |
| Include Path | #include "Rendering/Texture2DResource.h" |
Syntax
class FTexture2DResource : public FStreamableTextureResource
Inheritance Hierarchy
- FRenderResource → FTexture → FTextureResource → FStreamableTextureResource → FTexture2DResource
- FTexture → FTextureResource → FStreamableTextureResource → FTexture2DResource
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTexture2DResource
(
UTexture2D* InOwner, |
Minimal initialization constructor.Minimal initialization constructor. | Rendering/Texture2DResource.h | |
FTexture2DResource
(
UTexture2D* InOwner, |
Make this Texture2DResource Proxy another one. | Rendering/Texture2DResource.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FTexture2DResource() |
Destructor, freeing MipData in the case of resource being destroyed without ever having been initialized by the rendering thread via InitRHI. | Rendering/Texture2DResource.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MipData | TArray< void *, TInlineAllocator< MAX_TEXTURE_MIP_COUNT > > | Local copy/ cache of mip data between creation and first call to InitRHI. | Rendering/Texture2DResource.h | |
| MipDataSize | TArray< int64, TInlineAllocator< MAX_TEXTURE_MIP_COUNT > > | Rendering/Texture2DResource.h | ||
| ProxiedResource | const FTexture2DResource *const | Another resource being proxied by this one. | Rendering/Texture2DResource.h | |
| ResourceMem | FTexture2DResourceMem * | Resource memory allocated by the owner for serialize bulk mip data into | Rendering/Texture2DResource.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CacheSamplerStateInitializer
(
const UTexture2D* InOwner |
Set the value of Filter, AddressU, AddressV, AddressW and MipBias from FStreamableTextureResource on the gamethread. | Rendering/Texture2DResource.h |
Overridden from FStreamableTextureResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual uint64 GetPlatformMipsSize
(
uint32 NumMips |
Returns the platform mip size for the given mip count. | Rendering/Texture2DResource.h |
Overridden from FTextureResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FTexture2DResource * GetTexture2DResource () |
Dynamic cast methods. | Rendering/Texture2DResource.h | |
virtual const FTexture2DResource * GetTexture2DResource () |
Dynamic cast methods (const). | Rendering/Texture2DResource.h | |
virtual bool IsProxy() |
Returns true if the resource is proxying another one. | Rendering/Texture2DResource.h |
Overridden from FRenderResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitRHI
(
FRHICommandListBase& RHICmdList |
Rendering/Texture2DResource.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static uint32 CalculateTightPackedMipSize
(
int32 SizeX, |
Returns mip size in bytes; fills OutPitch | Rendering/Texture2DResource.h | |
static void WarnRequiresTightPackedMip
(
int32 SizeX, |
Warn if "Pitch" is not compatible with tight-packed requirement | Rendering/Texture2DResource.h |