Navigation
API > API/Runtime > API/Runtime/Engine
Encapsulates a Texture2DRHIRef for use by a Slate rendering implementation
| Name | FSlateTexture2DRHIRef |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Slate/SlateTextures.h |
| Include Path | #include "Slate/SlateTextures.h" |
Syntax
class FSlateTexture2DRHIRef :
public TSlateTexture< FTextureRHIRef > ,
public FSlateUpdatableTexture ,
public FDeferredCleanupInterface ,
public FRenderResource
Inheritance Hierarchy
- FDeferredCleanupInterface → FSlateTexture2DRHIRef
- FRenderResource → FSlateTexture2DRHIRef
- FSlateShaderResource → TSlateTexture → FSlateTexture2DRHIRef
- FSlateUpdatableTexture → FSlateTexture2DRHIRef
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateTexture2DRHIRef
(
uint32 InWidth, |
Slate/SlateTextures.h | ||
FSlateTexture2DRHIRef
(
FTextureRHIRef InRef, |
Slate/SlateTextures.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FSlateTexture2DRHIRef() |
Slate/SlateTextures.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCreateEmptyTexture | bool | Whether or not to create an empty texture when this resource is created. | Slate/SlateTextures.h | |
| PixelFormat | EPixelFormat | Pixel format of the texture | Slate/SlateTextures.h | |
| TexCreateFlags | ETextureCreateFlags | Texture creation flags for if this texture needs to be recreated dynamically | Slate/SlateTextures.h | |
| TextureData | TSharedPtr< FSlateTextureData, ESPMode::ThreadSafe > | Data used between ReleaseRHI and InitRHI. May be null if the data is not used | Slate/SlateTextures.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearTextureData() |
Clears texture data being used. Can only be accessed on the render thread | Slate/SlateTextures.h | |
EPixelFormat GetPixelFormat() |
Returns the pixel format of this texture | Slate/SlateTextures.h | |
FTextureRHIRef GetRHIRef() |
Slate/SlateTextures.h | ||
bool IsValid() |
Slate/SlateTextures.h | ||
void Resize
(
uint32 Width, |
Resize the texture. Can only be called on the render thread | Slate/SlateTextures.h | |
void SetRHIRef
(
FTextureRHIRef InRenderTargetTexture, |
Sets the RHI Ref to use. | Slate/SlateTextures.h | |
void SetTextureData
(
FSlateTextureDataPtr NewTextureData |
Sets the bulk data for this texture. | Slate/SlateTextures.h | |
void SetTextureData
(
FSlateTextureDataPtr NewTextureData, |
Sets the bulk data for this texture and the format of the rendering resource Note: Does not reinitialize the resource. | Slate/SlateTextures.h |
Overridden from FSlateShaderResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual uint32 GetHeight() |
Slate/SlateTextures.h | ||
virtual uint32 GetWidth() |
Slate/SlateTextures.h |
Overridden from FSlateUpdatableTexture
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Cleanup() |
Slate/SlateTextures.h | ||
virtual FRenderResource * GetRenderResource() |
Slate/SlateTextures.h | ||
virtual FSlateShaderResource * GetSlateResource() |
Slate/SlateTextures.h | ||
virtual void ResizeTexture
(
uint32 Width, |
Slate/SlateTextures.h | ||
virtual void UpdateTexture
(
const TArray< uint8 >& Bytes |
Slate/SlateTextures.h | ||
virtual void UpdateTextureThreadSafe
(
const TArray< uint8 >& Bytes |
Slate/SlateTextures.h | ||
virtual void UpdateTextureThreadSafeRaw
(
uint32 Width, |
Slate/SlateTextures.h | ||
virtual void UpdateTextureThreadSafeWithKeyedTextureHandle
(
void* TextureHandle, |
Slate/SlateTextures.h | ||
virtual void UpdateTextureThreadSafeWithTextureData
(
FSlateTextureData* BulkData |
Slate/SlateTextures.h |
Overridden from FRenderResource
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitRHI
(
FRHICommandListBase& RHICmdList |
FRenderResource Interface. | Slate/SlateTextures.h | |
virtual void ReleaseRHI () |
FRenderResource Interface. | Slate/SlateTextures.h |