Logo Mibo

MonoGameDiagnostics Module

Screen capture for the MonoGame backends.

Functions and values

Function or value Description

captureScreenshot device path

Full Usage: captureScreenshot device path

Parameters:
    device : GraphicsDevice - The graphics device of the running game.
    path : string - The file path. A missing directory is created.

Saves the back buffer to a PNG file at the given path.

Call this at the end of draw, before the framework presents the frame. The readback and the PNG encoding run on the calling thread, so expect one slow frame per capture.

device : GraphicsDevice

The graphics device of the running game.

path : string

The file path. A missing directory is created.

Type something to start searching.