engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FDummyViewport类 参考

Minimal viewport for assisting with taking screenshots (also used within a plugin) 更多...

#include <UnrealClient.h>

+ 类 FDummyViewport 继承关系图:

Public 成员函数

virtual void BeginRenderFrame (FRHICommandListImmediate &RHICmdList) override
 Starts a new rendering frame. 更多...
 
virtual void DeferInvalidateHitProxy () override
 Invalidates the viewport's cached hit proxies at the end of the frame.
 
virtual void EndRenderFrame (FRHICommandListImmediate &RHICmdList, bool bPresent, bool bLockToVsync) override
 Ends a rendering frame. 更多...
 
virtual FCanvas * GetDebugCanvas () override
 
virtual FString GetFriendlyName () const override
 
virtual FViewportFrame * GetViewportFrame () override
 Retrieves the interface to the viewport's frame, if it has one. 更多...
 
virtual void InitDynamicRHI () override
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual void InitResource () override
 Initializes the resource. 更多...
 
virtual void InitRHI () override
 Initializes the RHI resources used by this resource. 更多...
 
virtual void InvalidateDisplay () override
 Invalidates the viewport's displayed pixels.
 
virtual void ReleaseResource () override
 Prepares the resource for deletion. 更多...
 
virtual void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
virtual FIntPoint ViewportToVirtualDesktopPixel (FVector2D ViewportCoordinate) const override
 Transforms a coordinate in the local space of this viewport into a virtual desktop pixel. 更多...
 
virtual FVector2D VirtualDesktopPixelToViewport (FIntPoint VirtualDesktopPointPx) const override
 Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport 更多...
 
- Public 成员函数 继承自 FViewport
virtual ENGINE_API void BeginRenderFrame (FRHICommandListImmediate &RHICmdList)
 Starts a new rendering frame. 更多...
 
ENGINE_API FIntRect CalculateViewExtents (float AspectRatio, const FIntRect &ViewRect)
 Calculates the view inside the viewport when the aspect ratio is locked. 更多...
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnViewportResized, FViewport *, uint32)
 delegate type for viewport resize events ( Params: FViewport* Viewport, uint32 )
 
virtual ENGINE_API void DeferInvalidateHitProxy ()
 Invalidates the viewport's cached hit proxies at the end of the frame.
 
ENGINE_API void Draw (bool bShouldPresent=true)
 Updates the viewport's displayed pixels with the results of calling ViewportClient->Draw. 更多...
 
virtual int32 DrawStatsHUD (FCanvas *InCanvas, const int32 InX, const int32 InY)
 First chance for viewports to render custom stats text 更多...
 
virtual ENGINE_API void EndRenderFrame (FRHICommandListImmediate &RHICmdList, bool bPresent, bool bLockToVsync)
 Ends a rendering frame. 更多...
 
virtual ENGINE_API void EnqueueBeginRenderFrame (const bool bShouldPresent)
 Starts a new rendering frame. 更多...
 
virtual ENGINE_API void EnqueueEndRenderFrame (const bool bLockToVsync, const bool bShouldPresent)
 Ends a rendering frame. 更多...
 
ENGINE_API void GetActorsAndModelsInHitProxy (FIntRect InRect, TSet< AActor * > &OutActors, TSet< UModel * > &OutModels)
 Returns all actors and models found in the hit proxy within a specified region. 更多...
 
virtual FCanvas * GetDebugCanvas ()
 
virtual float GetDesiredAspectRatio () const
 
virtual ENGINE_API FRHIGPUMask GetGPUMask (FRHICommandListImmediate &RHICmdList) const override
 Returns the GPU nodes on which to render this viewport.
 
ENGINE_API HHitProxy * GetHitProxy (int32 X, int32 Y)
 Returns the dominant hit proxy at a given point. 更多...
 
ENGINE_API void GetHitProxyMap (FIntRect InRect, TArray< HHitProxy * > &OutMap)
 Copies the hit proxies from an area of the screen into a buffer. 更多...
 
virtual FIntPoint GetRenderTargetTextureSizeXY () const
 Returns dimensions of RenderTarget texture. 更多...
 
virtual FViewportFrame * GetViewportFrame ()=0
 Retrieves the interface to the viewport's frame, if it has one. 更多...
 
const FViewportRHIRef & GetViewportRHI () const
 Accessors for RHI resources
 
virtual ENGINE_API bool HasToggleFreezeCommand () override
 Returns if there is a command to freeze
 
ENGINE_API void Invalidate ()
 Invalidates cached hit proxies and the display.
 
virtual void InvalidateDisplay ()=0
 Invalidates the viewport's displayed pixels.
 
ENGINE_API void InvalidateHitProxy ()
 Invalidates cached hit proxies
 
virtual bool IsCursorVisible () const
 Returns true if the mouse cursor is currently visible 更多...
 
bool IsHDRViewport () const
 Returns true if this viewport should be rendered in HDR
 
virtual bool IsKeyboardAvailable (int32 ControllerID) const
 
virtual bool IsMouseAvailable (int32 ControllerID) const
 
bool IsPlayInEditorViewport () const
 Returns true if the viewport is for play in editor
 
bool IsSlateViewport () const
 Returns true if this is an FSlateSceneViewport
 
virtual bool IsStereoRenderingAllowed () const
 Should return true, if stereo rendering is allowed in this viewport
 
virtual ENGINE_API void ProcessToggleFreezeCommand () override
 Handles freezing/unfreezing of rendering
 
void SetHDRMode (bool bHDR)
 Sets HDR Status of Viewport
 
ENGINE_API void SetInitialSize (FIntPoint InitialSizeXY)
 Sets the initial size of this viewport. 更多...
 
void SetPlayInEditorViewport (bool bInPlayInEditorViewport)
 Sets this viewport as a play in editor viewport
 
virtual void SetPreCaptureMousePosFromSlateCursor ()
 Sets PreCapture coordinates from the current position of the slate cursor.
 
virtual void SetRequiresVsync (bool bShouldVsync)
 Indicate that the viewport should be block for vsync.
 
virtual ENGINE_API void SetViewportClient (FViewportClient *InViewportClient)
 Sets a viewport client if one wasn't provided at construction time. 更多...
 
ENGINE_API bool TakeHighResScreenShot ()
 Trigger a high res screenshot. 更多...
 
void UpdateRenderTargetSurfaceRHIToCurrentBackBuffer ()
 Update the render target surface RHI to the current back buffer
 
virtual FIntPoint ViewportToVirtualDesktopPixel (FVector2D ViewportCoordinate) const =0
 Transforms a coordinate in the local space of this viewport into a virtual desktop pixel. 更多...
 
virtual FVector2D VirtualDesktopPixelToViewport (FIntPoint VirtualDesktopPointPx) const =0
 Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport 更多...
 
- Public 成员函数 继承自 FRenderTarget
virtual ENGINE_API float GetDisplayGamma () const
 
virtual ENGINE_API FRHIGPUMask GetGPUMask (FRHICommandListImmediate &RHICmdList) const
 Returns the GPU nodes on which to render this rendertarget.
 
virtual ENGINE_API const FTexture2DRHIRef & GetRenderTargetTexture () const
 Accessor for the surface RHI when setting this render target 更多...
 
virtual bool HasToggleFreezeCommand ()
 Returns if there is a command to toggle freezerendering
 
virtual void ProcessToggleFreezeCommand ()
 Handles freezing/unfreezing of rendering
 
ENGINE_API bool ReadFloat16Pixels (TArray< FFloat16Color > &OutputBuffer, ECubeFace CubeFace=CubeFace_PosX)
 Reads the viewport's displayed pixels into the given color buffer. 更多...
 
ENGINE_API bool ReadLinearColorPixels (TArray< FLinearColor > &OutputBuffer, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_MinMax, CubeFace_MAX), FIntRect InRect=FIntRect(0, 0, 0, 0))
 Reads the viewport's displayed pixels into the given color buffer. 更多...
 
ENGINE_API bool ReadPixels (TArray< FColor > &OutImageData, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InRect=FIntRect(0, 0, 0, 0))
 Reads the viewport's displayed pixels into a preallocated color buffer. 更多...
 
ENGINE_API bool ReadPixelsPtr (FColor *OutImageBytes, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0))
 Reads the viewport's displayed pixels into a preallocated color buffer. 更多...
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 FViewport
static ENGINE_API bool IsGameRenderingEnabled ()
 Returns whether rendering is globally enabled or disabled. 更多...
 
static ENGINE_API void SetGameRenderingEnabled (bool bIsEnabled, int32 PresentAndStopMovieDelay=0)
 Globally enables/disables rendering 更多...
 
- Public 属性 继承自 FViewport
FString AppVersionString
 The current version of the running instance
 
- 静态 Public 属性 继承自 FViewport
static ENGINE_API FOnViewportResized ViewportResizedEvent
 Send when a viewport is resized
 
- Protected 成员函数 继承自 FViewport
void HighResScreenshot ()
 Take a high-resolution screenshot and save to disk.
 
virtual ENGINE_API void InitDynamicRHI () override
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual ENGINE_API void InitRHI () override
 Initializes the RHI resources used by this resource. 更多...
 
virtual ENGINE_API void ReleaseDynamicRHI () override
 Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多...
 
virtual ENGINE_API void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
virtual ENGINE_API void UpdateViewportRHI (bool bDestroyed, uint32 NewSizeX, uint32 NewSizeY, EWindowMode::Type NewWindowMode, EPixelFormat PreferredPixelFormat)
 Updates the viewport RHI with the current viewport state. 更多...
 
- Protected 成员函数 继承自 FRenderTarget
bool ReadFloat16Pixels (FFloat16Color *OutImageBytes, ECubeFace CubeFace=CubeFace_PosX)
 Reads the viewport's displayed pixels into a preallocated color buffer. 更多...
 
 FRenderResource ()
 Default constructor.
 
 FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 Constructor when we know what feature level this resource should support
 
virtual FString GetFriendlyName () const
 
virtual void InitDynamicRHI ()
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual void InitResource ()
 Initializes the resource. 更多...
 
virtual void InitRHI ()
 Initializes the RHI resources used by this resource. 更多...
 
virtual void ReleaseDynamicRHI ()
 Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多...
 
virtual void ReleaseResource ()
 Prepares the resource for deletion. 更多...
 
virtual void ReleaseRHI ()
 Releases the RHI resources used by this resource. 更多...
 
void UpdateRHI ()
 If the resource's RHI resources have been initialized, then release and reinitialize it. 更多...
 
virtual ~FRenderResource ()
 Destructor used to catch unreleased resources.
 
- 静态 Protected 成员函数 继承自 FRenderResource
static void InitPreRHIResources ()
 Initialize all resources initialized before the RHI was initialized
 
- Protected 属性 继承自 FViewport
uint32 bHasRequestedToggleFreeze: 1
 If a toggle freeze request has been made
 
uint32 bHitProxiesCached: 1
 True if the hit proxy buffer buffer has up to date hit proxies for this viewport.
 
uint32 bIsHDR: 1
 If true this viewport is being displayed on a HDR monitor
 
uint32 bIsPlayInEditorViewport: 1
 if true this viewport is for play in editor
 
uint32 bIsSlateViewport: 1
 If true this viewport is an FSlateSceneViewport
 
uint32 bRequiresHitProxyStorage: 1
 True if the viewport client requires hit proxy storage.
 
bool bTakeHighResScreenShot
 Triggers the taking of a high res screen shot for this viewport.
 
TArray< FColor > CachedHitProxyData
 Cached hit proxy data.
 
FHitProxyMap HitProxyMap
 The viewport's hit proxy map.
 
uint32 HitProxySize
 The size of the region to check hit proxies
 
uint32 InitialPositionX
 The initial position of the viewport.
 
uint32 InitialPositionY
 The initial position of the viewport.
 
uint32 SizeX
 The width of the viewport.
 
uint32 SizeY
 The height of the viewport.
 
FViewportClient * ViewportClient
 The viewport's client.
 
FViewportRHIRef ViewportRHI
 The RHI viewport.
 
FName ViewportType
 Used internally for testing runtime instance type before casting
 
EWindowMode::Type WindowMode
 What is the current window mode.
 
- 静态 Protected 属性 继承自 FViewport
static ENGINE_API bool bIsGameRenderingEnabled
 true if we should draw game viewports (has no effect on Editor viewports)
 
static int32 PresentAndStopMovieDelay
 Delay in frames to disable present (but still render scene) and stopping of a movie. 更多...
 

详细描述

Minimal viewport for assisting with taking screenshots (also used within a plugin)

待办事项:
: This should be refactored

成员函数说明

◆ BeginRenderFrame()

virtual void FDummyViewport::BeginRenderFrame ( FRHICommandListImmediate &  RHICmdList)
inlineoverridevirtual

Starts a new rendering frame.

Called from the rendering thread.

重载 FViewport .

◆ EndRenderFrame()

virtual void FDummyViewport::EndRenderFrame ( FRHICommandListImmediate &  RHICmdList,
bool  bPresent,
bool  bLockToVsync 
)
inlineoverridevirtual

Ends a rendering frame.

Called from the rendering thread.

参数
bPresentWhether the frame should be presented to the screen
bLockToVsyncWhether the GPU should block until VSYNC before presenting

重载 FViewport .

◆ GetDebugCanvas()

virtual FCanvas * FDummyViewport::GetDebugCanvas ( )
inlineoverridevirtual
返回
A canvas that can be used while this viewport is being drawn to render debug elements on top of everything else

重载 FViewport .

◆ GetFriendlyName()

virtual FString FDummyViewport::GetFriendlyName ( ) const
inlineoverridevirtual
返回
The resource's friendly name. Typically a UObject name.

重载 FRenderResource .

◆ GetViewportFrame()

virtual FViewportFrame * FDummyViewport::GetViewportFrame ( )
inlineoverridevirtual

Retrieves the interface to the viewport's frame, if it has one.

返回
The viewport's frame interface.

实现了 FViewport.

◆ InitDynamicRHI()

virtual void FDummyViewport::InitDynamicRHI ( )
inlineoverridevirtual

Initializes the dynamic RHI resource and/or RHI render target used by this resource.

Called when the resource is initialized, or when reseting all RHI resources. Resources that need to initialize after a D3D device reset must implement this function. This is only called by the rendering thread.

重载 FViewport .

◆ InitResource()

virtual void FDummyViewport::InitResource ( )
inlineoverridevirtual

Initializes the resource.

This is only called by the rendering thread.

重载 FRenderResource .

◆ InitRHI()

virtual void FDummyViewport::InitRHI ( )
inlineoverridevirtual

Initializes the RHI resources used by this resource.

Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

重载 FViewport .

◆ ReleaseResource()

virtual void FDummyViewport::ReleaseResource ( )
inlineoverridevirtual

Prepares the resource for deletion.

This is only called by the rendering thread.

重载 FRenderResource .

◆ ReleaseRHI()

virtual void FDummyViewport::ReleaseRHI ( )
inlineoverridevirtual

Releases the RHI resources used by this resource.

Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

重载 FViewport .

◆ ViewportToVirtualDesktopPixel()

virtual FIntPoint FDummyViewport::ViewportToVirtualDesktopPixel ( FVector2D  ViewportCoordinate) const
inlineoverridevirtual

Transforms a coordinate in the local space of this viewport into a virtual desktop pixel.

参数
ViewportCoordianteNormalized coordniate in the rate [0..1]; (0,0) is upper left and (1,1) is lower right.
返回
the transformed coordinate. It is in virtual desktop pixels.

实现了 FViewport.

◆ VirtualDesktopPixelToViewport()

virtual FVector2D FDummyViewport::VirtualDesktopPixelToViewport ( FIntPoint  VirtualDesktopPointPx) const
inlineoverridevirtual

Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport

参数
VirtualDesktopPointPxCoordinate on the virtual desktop in pixel units. Desktop is considered virtual because multiple monitors are supported.
返回
The transformed pixel. It is normalized to the range [0, 1]

实现了 FViewport.


该类的文档由以下文件生成: