FSlateTexture2DRHIRef::UpdateTextureThreadSafeRaw

Update the texture from a raw byte buffer.

Windows
MacOS
Linux

Override Hierarchy

FSlateUpdatableTexture::UpdateTextureThreadSafeRaw()

FSlateTexture2DRHIRef::UpdateTextureThreadSafeRaw()

References

Module

Engine

Header

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

Include

#include "Slate/SlateTextures.h"

Source

/Engine/Source/Runtime/Engine/Private/Slate/SlateTextures.cpp

Syntax

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

Remarks

Update the texture from a raw byte buffer. Should only be used when integrating with third party APIs that provide a raw pointer to texture data. This method does a copy of the buffer for thread safety. Will resize the texture if the passed in width and height is different from the current size. The passed in size must correspond to the size of the buffer and the data must be valid for the entire texture, even when passing in a Dirty rectangle, as the implementation may chose to copy a larger area than specified. The RHI renderer currently ignores the Dirty argument completely.

Parameters

Parameter

Description

Width

New texture width

Height

New texture height

Buffer

A void pointer to a byte buffer.

Dirty

An optional hint of the area to update. An empty rectangle means that the entire texture should be updated.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss