FSlateTexture2DRHIRef

Encapsulates a Texture2DRHIRef for use by a Slate rendering implementation

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Slate/SlateTextures.h

Include

#include "Slate/SlateTextures.h"

Syntax

class FSlateTexture2DRHIRef :
    public TSlateTexture< FTexture2DRHIRef >,
    public FSlateUpdatableTexture,
    public FDeferredCleanupInterface,
    public FRenderResource

Remarks

Encapsulates a Texture2DRHIRef for use by a Slate rendering implementation

Variables

Name Description

Protected variable

uint32

 

Height

Height of this texture

Protected variable

uint32

 

Width

Width of this texture

Constructors

Name Description

Public function

FSlateTexture2DRHIRef

(
    FTexture2DRHIRef InRef,
    uint32 InWidth,
    uint32 InHeight
)

Public function

FSlateTexture2DRHIRef

(
    uint32 InWidth,
    uint32 InHeight,
    EPixelFormat InPixelFormat,
    TSharedPtr< FSlateTextureData, ESPM...,
    uint32 InTexCreateFlags,
    bool bCreateEmptyTexture
)

Destructors

Name Description

Public function Virtual

~FSlateTexture2DRHIRef()

Functions

Name Description

Public function

void

 

ClearTextureData()

Clears texture data being used. Can only be accessed on the render thread

Public function Const

EPixelFormat

 

GetPixelFormat()

Returns the pixel format of this texture

Public function Const

FTexture2DRH...

 

GetRHIRef()

Public function Const

bool

 

IsValid()

Public function

void

 

Resize

(
    uint32 Width,
    uint32 Height
)

Resize the texture. Can only be called on the render thread

Public function

void

 

SetRHIRef

(
    FTexture2DRHIRef InRenderTargetText...,
    uint32 InWidth,
    uint32 InHeight
)

Sets the RHI Ref to use.

Public function

void

 

SetTextureData

(
    FSlateTextureDataPtr NewTextureData
)

Sets the bulk data for this texture.

Public function

void

 

SetTextureData

(
    FSlateTextureDataPtr NewTextureData,
    EPixelFormat InPixelFormat,
    uint32 InTexCreateFlags
)

Sets the bulk data for this texture and the format of the rendering resource Note: Does not reinitialize the resource.

Overridden from FSlateShaderResource

Name Description

Public function Virtual Const

uint32

 

GetHeight()

Gets the height of the resource.

Public function Virtual Const

uint32

 

GetWidth()

Gets the width of the resource.

Overridden from FSlateUpdatableTexture

Name Description

Public function Virtual

void

 

Cleanup()

Deferred or Immediate cleanup of this data depending on what is required.

Public function Virtual

FRenderResou...

 

GetRenderResource()

Gets the interface to the underlying render resource (may not always be used)

Public function Virtual

FSlateShader...

 

GetSlateResource()

Gets the interface to the underlying platform independent texture

Public function Virtual

void

 

ResizeTexture

(
    uint32 Width,
    uint32 Height
)

Resize the texture.

Public function Virtual

void

 

UpdateTexture

(
    const TArray< uint8 >& Bytes
)

Updates the texture contents via a byte array.

Public function Virtual

void

 

UpdateTextureThreadSafe

(
    const TArray< uint8 >& Bytes
)

Updates the texture contents via a byte array making a copy first for thread safety

Public function Virtual

void

 

UpdateTextureThreadSafeRaw

(
    uint32 Width,
    uint32 Height,
    const void* Buffer,
    const FIntRect& Dirty
)

Update the texture from a raw byte buffer.

Public function Virtual

void

 

UpdateTextureThreadSafeWithTextureData

(
    FSlateTextureData* TextureData
)

Update the texture from a provided FSlateTextureData buffer, also transferring ownership of the texture

Overridden from FRenderResource

Name Description

Public function Virtual

void

 

InitDynamicRHI()

FRenderResource Interface.

Public function Virtual

void

 

ReleaseDynamicRHI()

FRenderResource Interface.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback