(filename)
| 249 | printMeshData(controller, meshOutputs) |
| 250 | |
| 251 | def loadCapture(filename): |
| 252 | # Open a capture file handle |
| 253 | cap = rd.OpenCaptureFile() |
| 254 | |
| 255 | # Open a particular file - see also OpenBuffer to load from memory |
| 256 | result = cap.OpenFile(filename, '', None) |
| 257 | |
| 258 | # Make sure the file opened successfully |
| 259 | if result != rd.ResultCode.Succeeded: |
| 260 | raise RuntimeError("Couldn't open file: " + str(result)) |
| 261 | |
| 262 | # Make sure we can replay |
| 263 | if not cap.LocalReplaySupport(): |
| 264 | raise RuntimeError("Capture cannot be replayed") |
| 265 | |
| 266 | # Initialise the replay |
| 267 | result,controller = cap.OpenCapture(rd.ReplayOptions(), None) |
| 268 | |
| 269 | if result != rd.ResultCode.Succeeded: |
| 270 | raise RuntimeError("Couldn't initialise replay: " + str(result)) |
| 271 | |
| 272 | return (cap, controller) |
| 273 | |
| 274 | if 'pyrenderdoc' in globals(): |
| 275 | pyrenderdoc.Replay().BlockInvoke(sampleCode) |
no test coverage detected