MCPcopy Create free account
hub / github.com/baldurk/renderdoc / loadCapture

Function loadCapture

docs/python_api/examples/renderdoc/display_window.py:10–31  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

8rd = renderdoc
9
10def loadCapture(filename):
11 # Open a capture file handle
12 cap = rd.OpenCaptureFile()
13
14 # Open a particular file - see also OpenBuffer to load from memory
15 result = cap.OpenFile(filename, '', None)
16
17 # Make sure the file opened successfully
18 if result != rd.ResultCode.Succeeded:
19 raise RuntimeError("Couldn't open file: " + str(result))
20
21 # Make sure we can replay
22 if not cap.LocalReplaySupport():
23 raise RuntimeError("Capture cannot be replayed")
24
25 # Initialise the replay
26 result,controller = cap.OpenCapture(rd.ReplayOptions(), None)
27
28 if result != rd.ResultCode.Succeeded:
29 raise RuntimeError("Couldn't initialise replay: " + str(result))
30
31 return cap,controller
32
33if 'pyrenderdoc' in globals():
34 raise RuntimeError("This sample should not be run within the RenderDoc UI")

Callers 1

display_window.pyFile · 0.70

Calls 4

OpenFileMethod · 0.80
LocalReplaySupportMethod · 0.80
OpenCaptureMethod · 0.45
ReplayOptionsMethod · 0.45

Tested by

no test coverage detected