Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Public/RenderCaptureInterface.h
Marc Audy 0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -04:00

32 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
class FRHICommandListImmediate;
/** Easy to use interface for IRenderCaptureProvider. */
namespace RenderCaptureInterface
{
/**
* Helper for capturing within a scope.
* Handles both game and render thread. Fails gracefully if no IRenderCaptureProvider exists.
*/
class FScopedCapture
{
public:
/** Use this constructor if not on rendering thread. Use bEnable to allow control over the capture frequency. */
RENDERCORE_API FScopedCapture(bool bEnable, TCHAR const* InEventName = nullptr, TCHAR const* InFileName = nullptr);
/** Use this constructor if on rendering thread. Use bEnable to allow control over the capture frequency. */
RENDERCORE_API FScopedCapture(bool bEnable, FRHICommandListImmediate* InRHICommandList, TCHAR const* InEventName = nullptr, TCHAR const* InFileName = nullptr);
RENDERCORE_API ~FScopedCapture();
private:
bool bCapture;
bool bEvent;
FRHICommandListImmediate* RHICommandList;
};
}