engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
FViewportSurfaceReader结构体 参考

A single, managed surface used as a render target resolution destination
更多...

#include <FrameGrabber.h>

Public 成员函数

void BlockUntilAvailable ()
 Wait for this reader to become available, if it's currently in use
 
 FViewportSurfaceReader (EPixelFormat InPixelFormat, FIntPoint InBufferSize)
 Constructor
 
FIntPoint GetCurrentSize () const
 Get the current size of the texture
 
void Initialize ()
 Initialize this reader so that it can be waited on.
 
void Reset ()
 Safely resets the state of the wait event. 更多...
 
void ResolveRenderTarget (FViewportSurfaceReader *RenderToReadback, const FTexture2DRHIRef &BackBuffer, TFunction< void(FColor *, int32, int32)> Callback)
 Resolve the specified viewport RHI, calling the specified callback with the result. 更多...
 
void SetCaptureRect (FIntRect InCaptureRect)
 Set the rectangle within which to read pixels
 
void SetWindowSize (FIntPoint InWindowSize)
 Set the window size that we expect from the BackBuffer
 
 ~FViewportSurfaceReader ()
 Destructor
 

Protected 成员函数

void Resize (uint32 Width, uint32 Height)
 Set up this surface to the specified width/height
 

Protected 属性

FEvent * AvailableEvent
 Optional event that is triggered when the surface is no longer in use
 
FThreadSafeBool bEnabled
 Whether this surface reader is enabled or not
 
bool bIsEnabled
 Whether this reader is enabled or not.
 
FIntRect CaptureRect
 The rectangle to read from the surface
 
EPixelFormat PixelFormat
 The desired pixel format of the resolved textures
 
FTexture2DRHIRef ReadbackTexture
 Texture used to store the resolved render target
 
FIntPoint WindowSize
 In windows mode, the size of the widget with the border
 

详细描述

A single, managed surface used as a render target resolution destination

成员函数说明

◆ Reset()

void FViewportSurfaceReader::Reset ( )

Safely resets the state of the wait event.

When doing latent surface reading sometimes we may want to just bail on reading a given frame. Should only be performed after flushing rendering commands.

◆ ResolveRenderTarget()

void FViewportSurfaceReader::ResolveRenderTarget ( FViewportSurfaceReader *  RenderToReadback,
const FTexture2DRHIRef &  BackBuffer,
TFunction< void(FColor *, int32, int32)>  Callback 
)

Resolve the specified viewport RHI, calling the specified callback with the result.

参数
BackBufferThe backbuffer to resolve
CallbackCallback to call with the locked texture data. This will be called on an undefined thread.

该结构体的文档由以下文件生成: