Improve RenderDocCapture API
- Add SetWindow() method for separate window configuration - BeginCapture/EndCapture now return bool for error feedback - Add GetCapture() method to retrieve capture file info - Add LaunchReplayUI() method - Add SetCaptureOptionU32() for user-configurable capture options - Add null pointer checks in BeginCapture with Logger warnings - Add RenderDocCaptureInfo struct for capture file metadata
This commit is contained in:
@@ -8,24 +8,35 @@ namespace Debug {
|
||||
|
||||
#define RENDERDOC_CC __cdecl
|
||||
|
||||
struct RenderDocCaptureInfo {
|
||||
char filename[256];
|
||||
uint32_t length;
|
||||
uint64_t timestamp;
|
||||
};
|
||||
|
||||
class RenderDocCapture {
|
||||
public:
|
||||
static RenderDocCapture& Get();
|
||||
|
||||
bool Initialize(void* device, void* window = nullptr);
|
||||
bool Initialize(void* device = nullptr, void* window = nullptr);
|
||||
void Shutdown();
|
||||
void SetDevice(void* device);
|
||||
void SetWindow(void* window);
|
||||
|
||||
bool IsLoaded() const { return m_isLoaded; }
|
||||
bool IsCapturing() const;
|
||||
uint32_t GetNumCaptures() const;
|
||||
bool GetCapture(uint32_t index, RenderDocCaptureInfo* info) const;
|
||||
|
||||
void BeginCapture(const char* title = nullptr);
|
||||
void EndCapture();
|
||||
bool BeginCapture(const char* title = nullptr);
|
||||
bool EndCapture();
|
||||
void TriggerCapture();
|
||||
|
||||
void SetCaptureFilePath(const char* path);
|
||||
void SetCaptureComments(const char* comments);
|
||||
void SetCaptureOptionU32(uint32_t option, uint32_t value);
|
||||
|
||||
bool LaunchReplayUI(uint32_t connect = 1, const char* cmdline = nullptr);
|
||||
|
||||
private:
|
||||
RenderDocCapture() = default;
|
||||
|
||||
Reference in New Issue
Block a user