Plasma Engine  2.0
Loading...
Searching...
No Matches
RenderDocSingleton.h
1#pragma once
2
3#include <Core/Interfaces/FrameCaptureInterface.h>
4#include <Foundation/Configuration/Plugin.h>
5#include <Foundation/Configuration/Singleton.h>
6#include <RenderDocPlugin/RenderDocPluginDLL.h>
7
8struct RENDERDOC_API_1_4_1;
9
19class PL_RENDERDOCPLUGIN_DLL plRenderDoc : public plFrameCaptureInterface
20{
21 PL_DECLARE_SINGLETON_OF_INTERFACE(plRenderDoc, plFrameCaptureInterface);
22
23public:
25 virtual ~plRenderDoc();
26
27 virtual bool IsInitialized() const override;
28 virtual void SetAbsCaptureFilePathTemplate(plStringView sFilePathTemplate) override;
29 virtual plStringView GetAbsCaptureFilePathTemplate() const override;
30 virtual void StartFrameCapture(plWindowHandle hWnd) override;
31 virtual bool IsFrameCapturing() const override;
32 virtual void EndFrameCaptureAndWriteOutput(plWindowHandle hWnd) override;
33 virtual void EndFrameCaptureAndDiscardResult(plWindowHandle hWnd) override;
34 virtual plResult GetLastAbsCaptureFileName(plStringBuilder& out_sFileName) const override;
35
36private:
37 RENDERDOC_API_1_4_1* m_pRenderDocAPI = nullptr;
38 plMinWindows::HMODULE m_pHandleToFree = nullptr;
39};
Definition FrameCaptureInterface.h:6
virtual plResult GetLastAbsCaptureFileName(plStringBuilder &out_sFileName) const =0
Retrieve the absolute file name of the last successful frame capture. Returns PL_FAILURE if no succes...
virtual bool IsInitialized() const =0
Determine if a singleton implementing this interface has successfully been initialized and frame capt...
virtual void EndFrameCaptureAndWriteOutput(plWindowHandle hWnd)=0
End the current frame capture and write the result to the path given by SetAbsCaptureFilePathTemplate...
virtual void EndFrameCaptureAndDiscardResult(plWindowHandle hWnd)=0
End the current frame capture and discard the corresponding data, saving processing time and file I/O...
virtual plStringView GetAbsCaptureFilePathTemplate() const =0
Retrieve the absolute file path for storing frame captures.
virtual void StartFrameCapture(plWindowHandle hWnd)=0
Start capturing a frame rendered to the given window.
virtual bool IsFrameCapturing() const =0
Determine if a frame capture is currently in progress.
virtual void SetAbsCaptureFilePathTemplate(plStringView sFilePathTemplate)=0
Specify the absolute base file path for storing frame captures. For the final output file name,...
RenderDoc implementation of the plFrameCaptureInterface interface.
Definition RenderDocSingleton.h:20
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54