/// <summary> /// Gets the display modes that match the requested format and other input options. /// </summary> /// <param name="format">The color format (see <seealso cref="DXGIFormat" />).</param> /// <param name="flags"> /// Options for modes to include (see <seealso cref="DXGIEnumModes" />). <seealso cref="DXGIEnumModes.Scaling" /> needs /// to be specified /// to expose the display modes that require scaling. Centered modes, requiring no scaling and corresponding directly /// to the display output, are enumerated by default. /// </param> /// <param name="numModes"> /// Set <paramref name="modesDesc" /> to <seealso langword="null" /> so that <paramref name="numModes" /> /// returns the number of display modes that match the format and the options. /// Otherwise, <paramref name="modesDesc" /> returns the number of display modes returned in /// <paramref name="modesDesc" />. /// </param> /// <param name="modesDesc"> /// A pointer to a list of display modes (see <seealso cref="DXGIModeDescription" />); set to /// <seealso langword="null" /> to get the number of display modes. /// </param> /// <returns></returns> /// <remarks> /// In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode /// that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control /// over the display mode, use this API to poll the set of display modes that are validated against monitor /// capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor). /// As shown, this API is designed to be called twice. First to get the number of modes available, and second to return /// a description of the modes. /// </remarks> public int GetDisplayModeList ( DXGIFormat format, DXGIEnumModes flags, ref uint numModes, [In, Out] DXGIModeDescription[] modesDesc = null ) { return(GetMethodDelegate <GetDisplayModeListDelegate>() .Invoke(this, format, flags, ref numModes, modesDesc)); }
/// <summary> /// Gets the display modes that match the requested format and other input options. /// </summary> /// <param name="enumFormat">The color format (see <seealso cref="DXGIFormat" />).</param> /// <param name="flags"> /// Options for modes to include (see <seealso cref="DXGIEnumModes" />). <seealso cref="DXGIEnumModes.Scaling" /> needs /// to be specified /// to expose the display modes that require scaling. Centered modes, requiring no scaling and corresponding directly /// to the display output, are enumerated by default. /// </param> /// <param name="numModes"> /// Set <paramref name="modesDesc" /> to <seealso langword="null" /> so that <paramref name="numModes" /> /// returns the number of display modes that match the format and the options. /// Otherwise, <paramref name="modesDesc" /> returns the number of display modes returned in /// <paramref name="modesDesc" />. /// </param> /// <param name="modesDesc"> /// A pointer to a list of display modes (see <seealso cref="DXGIModeDescription1" />); set to /// <seealso langword="null" /> to get the number of display modes. /// </param> /// <returns></returns> /// <remarks> /// In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode /// that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control /// over the display mode, use this API to poll the set of display modes that are validated against monitor /// capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor). /// As shown, this API is designed to be called twice. First to get the number of modes available, and second to return /// a description of the modes. /// </remarks> /// <returns></returns> public int GetDisplayModeList1(DXGIFormat enumFormat, DXGIEnumModes flags, ref uint numModes, DXGIModeDescription1[] modesDesc = null) { return(GetMethodDelegate <DXGIGetDisplayModeList1Delegate>() .Invoke(this, enumFormat, flags, ref numModes, modesDesc)); }