# capture-frame=150
line and change the value to the required frame number to stop at. When an application is run with GPU PerfStudio, a frame counter is used to count the number of frames rendered (starting at 1). Once the frame counter reaches the value specified, the frame will be captured. In the example here, the application will run until frame 150 is reached, and frame 150 will be captured. The application will appear to pause once a capture has been performed, and will behave as if the client was used to pause the application. A message will be shown in the log and in the GPU PerfStudio console window indicating that a capture was completed.
Once a frame has been captured, it is simply a case of loading the client and connecting to the server. Since the capture has already been performed, the tool icons (frame debugger, frame profiler and API trace) will be available for use immediately (there is no need to pause the application).
From the Frame Debugger settings, ensure that the "AutoCapture subsequent frames" check box is checked, and in the "Number of frames to advance before next capture" edit box, enter the number of frames to skip before automatically capturing the next frame. For example, entering a value of 10 will cause the application to run normally for 10 frames and then perform an automatic capture.
When the application is paused, the AutoCapture settings can be changed and will be applied each time the application is resumed. It is also possible to enable or disable AutoCapture for subsequent frames when the application is paused.
This feature is designed to work optimally for playing back trace files but can also be used to step through live applications. Since GPU PerfStudio intercepts the timing functions, stepping forward a single frame in some applications may not work as expected. The application may either appear frozen or may appear to skip forward in time. In both these cases, change the Number of frames to advance before next capture to 2 or greater.