# Windows

Contents

- Windows
  - Main Window
  - Event Browser
  - API Inspector
  - Pipeline State
  - Texture Viewer
  - Buffer Viewer
  - Resource Inspector
  - Capture Dialog
  - Debug Messages
  - Comment View
  - Statistics Viewer
  - Timeline Bar
  - Performance Counter Viewer
  - Python Shell
  - Shader Viewer
  - Constant Buffer Previewer
  - Pixel History

## Main Window

class `qrenderdoc.``MainWindow`

  The main parent window of the application.

  `ShortcutCallback`(QWidget focusWidget)

    Not a member function - the signature for any `ShortcutCallback` callbacks.

    Parameters: | focusWidget (QWidget) – The widget with focus at the time this shortcut was detected. May be `None`.

  `RegisterShortcut`(shortcut, widget, callback)

    Register a callback for a particular key shortcut.

    This creates a managed shortcut. Qt’s shortcut system doesn’t allow specialisation/duplication, so you can’t use `Ctrl+S` for a shortcut in a window to update some changes if there’s also a global `Ctrl+S` shortcut on the window. In the end, neither shortcut will be called.

    Instead this function allows the main window to manage shortcuts internally, and it will pick the closest shortcut to a given action. The search goes from the widget with the focus currently up the chain of parents, with the first match being used. If no matches are found, then a ‘global’ default will be invoked, if it exists.

    Parameters: | shortcut (str) – The text string representing the shortcut, e.g. ‘Ctrl+S’. widget (QWidget) – A handle to the widget to use as the context for this shortcut, or `None` for a global shortcut. Note that if an existing global shortcut exists the new one will not be registered.

  `UnregisterShortcut`(shortcut, widget)

    Unregister a callback for a particular key shortcut, made in a previous call to `RegisterShortcut()`.

    See the documentation for `RegisterShortcut()` for what these shortcuts are for.

    Parameters: | shortcut (str) – The text string representing the shortcut, e.g. ‘Ctrl+S’. To unregister all shortcuts for a particular widget, you can pass an empty string here. In this case, `UnregisterShortcut.widget` must not be `None`. widget (QWidget) – A handle to the widget used as the context for the shortcut, or `None` if referring to a global shortcut.

  `Widget`()

    Retrieves the QWidget for this `MainWindow` if PySide2 is available, or otherwise a unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Event Browser

class `qrenderdoc.``EventBrowser`

  The event browser window.

  `UpdateDurationColumn`()

    Updates the duration column if the selected time unit changes.

  `Widget`()

    Retrieves the QWidget for this `EventBrowser` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## API Inspector

class `qrenderdoc.``APIInspector`

  The API inspector window.

  `Refresh`()

    Refresh the current API view - useful if callstacks are now available.

  `Widget`()

    Retrieves the QWidget for this `APIInspector` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Pipeline State

class `qrenderdoc.``PipelineStateViewer`

  The pipeline state viewer window.

  `SaveShaderFile`(shader)

    Prompt the user to save the binary form of the given shader to disk.

    Parameters: | shader (ShaderReflection) – The shader reflection data to save.

  `Widget`()

    Retrieves the QWidget for this `PipelineStateViewer` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Texture Viewer

class `qrenderdoc.``TextureViewer`

  The texture viewer window.

  `GotoLocation`(x, y)

    Highlights the given pixel location in the current texture.

    Parameters: | x (int) – The X co-ordinate. y (int) – The Y co-ordinate.

  `ViewTexture`(resourceId, focus)

    Open a texture view, optionally raising this window to the foreground.

    Parameters: | resourceId (ResourceId) – The ID of the texture to view. focus (bool) – `True` if the `TextureViewer` should be raised.

  `Widget`()

    Retrieves the QWidget for this `TextureViewer` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Buffer Viewer

class `qrenderdoc.``BufferViewer`

  The buffer viewer window, either a raw buffer or the geometry pipeline.

  `ScrollToRow`(row, stage)

    ScrollToRow(row)

    Scroll to the given row in the given stage’s data.

    Parameters: | row (int) – the row to scroll to. stage (MeshDataStage) – The stage of the geometry pipeline to scroll within.

  `ViewBuffer`(byteOffset, byteSize, id, format)

    ViewBuffer(byteOffset, byteSize, id)

    In a raw buffer viewer, load the contents from a particular buffer resource.

    Parameters: | byteOffset (int) – The offset in bytes to the start of the data. byteSize (int) – The number of bytes to read out. id (ResourceId) – The ID of the buffer itself. format (str) – Optionally a HLSL/GLSL style formatting string.

  `ViewTexture`(arrayIdx, mip, id, format)

    ViewTexture(arrayIdx, mip, id)

    In a raw buffer viewer, load the contents from a particular texture resource.

    Parameters: | arrayIdx (int) – The array slice to load from. mip (int) – The mip level to load from. id (ResourceId) – The ID of the texture itself. format (str) – Optionally a HLSL/GLSL style formatting string.

  `Widget`()

    Retrieves the QWidget for this `BufferViewer` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Resource Inspector

class `qrenderdoc.``ResourceInspector`

  The Resource inspector window.

  `CurrentResource`()

    Return which resource is currently being inspected.

    Returns: | The ID of the resource being inspected.
    Return type: | ResourceId

  `Inspect`(id)

    Change the current resource being inspected.

    Parameters: | id (ResourceId) – The ID of the resource to inspect.

  `Widget`()

    Retrieves the QWidget for this `ResourceInspector` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Capture Dialog

class `qrenderdoc.``CaptureDialog`

  The executable capture window.

  `IsInjectMode`()

    Determines if the window is in inject or launch mode.

    Returns: | `True` if the window is set up for injecting.
    Return type: | `bool`

  `LoadSettings`(filename)

    Loads settings from a file and applies them. See `SetSettings()`.

    Parameters: | filename (str) – The filename to load the settings from.

  `SaveSettings`(filename)

    Saves the current settings to a file. See `Settings()`.

    Parameters: | filename (str) – The filename to save the settings to.

  `SetCommandLine`(cmd)

    Sets the command line string to use when launching an executable.

    Parameters: | cmd (str) – The command line to use.

  `SetEnvironmentModifications`(modifications)

    Sets the list of environment modifications to apply when launching.

    Parameters: | modifications (list) – The list of `EnvironmentModification` to apply.

  `SetExecutableFilename`(filename)

    Sets the executable filename to capture.

    Parameters: | filename (str) – The filename to execute.

  `SetInjectMode`(inject)

    Switches the window to or from inject mode.

    Parameters: | inject (bool) – `True` if the window should configure for injecting into processes.

  `SetSettings`(settings)

    Configures the window based on a bulk structure of settings.

    Parameters: | settings (CaptureSettings) – The settings to apply.

  `SetWorkingDirectory`(dir)

    Sets the working directory for capture.

    Parameters: | dir (str) – The directory to use.

  `Settings`()

    Retrieves the current state of the window as a structure of settings.

    Returns: | The settings describing the current window state.
    Return type: | CaptureSettings

  `TriggerCapture`()

    Launches a capture of the current executable.

  `UpdateGlobalHook`()

    Update the current state of the global hook, e.g. if it has been enabled.

  `UpdateRemoteHost`()

    Update the current state based on the current remote host, when that changes.

  `Widget`()

    Retrieves the QWidget for this `CaptureDialog` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Debug Messages

class `qrenderdoc.``DebugMessageView`

  The debug warnings and errors window.

  `Widget`()

    Retrieves the QWidget for this `DebugMessageView` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Comment View

class `qrenderdoc.``CommentView`

  The capture comments window.

  `Widget`()

    Retrieves the QWidget for this `CommentView` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Statistics Viewer

class `qrenderdoc.``StatisticsViewer`

  The statistics window.

  `Widget`()

    Retrieves the QWidget for this `StatisticsViewer` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Timeline Bar

class `qrenderdoc.``TimelineBar`

  The timeline bar.

  `HighlightHistory`(id, history)

    Highlights the modifications in a frame of a given resource.

    Parameters: | id (ResourceId) – The ID of the resource that is being modified. history (list) – A list of `PixelModification` events to display.

  `HighlightResourceUsage`(id)

    Highlights the frame usage of the specified resource.

    Parameters: | id (ResourceId) – The ID of the resource to highlight.

  `Widget`()

    Retrieves the QWidget for this `TimelineBar` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Performance Counter Viewer

class `qrenderdoc.``PerformanceCounterViewer`

  The performance counter view window.

  `Widget`()

    Retrieves the QWidget for this `PerformanceCounterViewer` if PySide2 is available, or `None`.

## Python Shell

class `qrenderdoc.``PythonShell`

  The interactive python shell.

  `Widget`()

    Retrieves the QWidget for this `PythonShell` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Shader Viewer

class `qrenderdoc.``ShaderViewer`

  A shader window used for viewing, editing, or debugging.

  `SaveCallback`(context, viewer, files)

    Not a member function - the signature for any `SaveCallback` callbacks.

    Called whenever a shader viewer that was open for editing triggers a save/update.

    Parameters: | context (CaptureContext) – The current capture context. viewer (ShaderViewer) – The open shader viewer. files (list) – A `list` with 2-tuples of `str`, the first element being the filename and the second element being the file contents.

  `CloseCallback`(context)

    Not a member function - the signature for any `CloseCallback` callbacks.

    Called whenever a shader viewer that was open for editing is closed.

    Parameters: | context (CaptureContext) – The current capture context.

  `AddWatch`(expression)

    Add an expression to the watch panel.

    Parameters: | expression (str) – The name of the expression to watch.

  `CurrentStep`()

    Retrieves the current step in the debugging.

    Returns: | The current step.
    Return type: | `int`

  `SetCurrentStep`(step)

    Sets the current step in the debugging.

    Parameters: | step (int) – The current step to jump to.

  `ShowErrors`(errors)

    Show a list of shader compilation errors or warnings.

    Parameters: | errors (str) – The string of errors or warnings to display.

  `ToggleBreakpoint`(instruction=-1)

    ToggleBreakpoint()

    Toggles a breakpoint at a given instruction.

    Parameters: | instruction (int) – The instruction to toggle breakpoint at. If this is `-1` the nearest instruction after the current caret position is used.

  `Widget`()

    Retrieves the QWidget for this `ShaderViewer` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Constant Buffer Previewer

class `qrenderdoc.``ConstantBufferPreviewer`

  A constant buffer preview window.

  `Widget`()

    Retrieves the QWidget for this `ConstantBufferPreviewer` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.

## Pixel History

class `qrenderdoc.``PixelHistoryView`

  A pixel history window.

  `SetHistory`(history)

    Set the history displayed in this window.

    Parameters: | history (list) – A list of `PixelModification` events to display.

  `Widget`()

    Retrieves the QWidget for this `PixelHistoryView` if PySide2 is available, or otherwise unique opaque pointer that can be passed to RenderDoc functions expecting a QWidget.