Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FRenderTarget
Description
Reads the render target's displayed pixels into a preallocated color buffer. Ptr variant of this API just does an extra memcpy; prefer the TArray variant. Prefer using FImageUtils::GetRenderTargetImage rather than calling this directly.
| Name | ReadPixelsPtr |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Public/UnrealClient.h |
| Include Path | #include "UnrealClient.h" |
| Source | /Engine/Source/Runtime/Engine/Private/UnrealClient.cpp |
bool ReadPixelsPtr
(
FColor * OutImageBytes,
FReadSurfaceDataFlags InFlags,
FIntRect InSrcRect
)
True if the read succeeded.
Parameters
| Name | Remarks |
|---|---|
| OutImageBytes | RGBA8 values will be stored in this buffer. Buffer must be preallocated with the correct size! |
| InFlags | Additional information about how to to read the surface data (cube face, slice index, etc.) |
| InSrcRect | InSrcRect not specified means the whole rect |