(filename)
| 74 | controller.SaveTexture(texsave, filename + ".dds") |
| 75 | |
| 76 | def loadCapture(filename): |
| 77 | # Open a capture file handle |
| 78 | cap = rd.OpenCaptureFile() |
| 79 | |
| 80 | # Open a particular file - see also OpenBuffer to load from memory |
| 81 | result = cap.OpenFile(filename, '', None) |
| 82 | |
| 83 | # Make sure the file opened successfully |
| 84 | if result != rd.ResultCode.Succeeded: |
| 85 | raise RuntimeError("Couldn't open file: " + str(result)) |
| 86 | |
| 87 | # Make sure we can replay |
| 88 | if not cap.LocalReplaySupport(): |
| 89 | raise RuntimeError("Capture cannot be replayed") |
| 90 | |
| 91 | # Initialise the replay |
| 92 | result,controller = cap.OpenCapture(rd.ReplayOptions(), None) |
| 93 | |
| 94 | if result != rd.ResultCode.Succeeded: |
| 95 | raise RuntimeError("Couldn't initialise replay: " + str(result)) |
| 96 | |
| 97 | return (cap, controller) |
| 98 | |
| 99 | if 'pyrenderdoc' in globals(): |
| 100 | pyrenderdoc.Replay().BlockInvoke(sampleCode) |
no test coverage detected