Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    GraphicsOutput Class

    Namespace: Stride.Graphics
    Assembly: Stride.Graphics.dll

    Provides methods to retrieve and manipulate an graphics output (a monitor), it is equivalent to SharpDX.DXGI.Output.

    System.Object → DisposeBase → ComponentBase → GraphicsOutput
    Derived from GraphicsOutput:

    public class GraphicsOutput : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
    Name Description
    Properties
    Adapter

    Gets the adapter this output is attached.

    CurrentDisplayMode

    Gets the current display mode.

    DesktopBounds

    Gets the desktop bounds of the current output.

    MonitorHandle

    Retrieves the handle of the monitor associated with this GraphicsOutput.

    SupportedDisplayModes

    Returns a collection of supported display modes for this GraphicsOutput.

    Methods
    FindClosestMatchingDisplayMode(GraphicsProfile[], DisplayMode)

    Find the display mode that most closely matches the requested display mode.

    | Improve this Doc View Source

    Properties


    Adapter

    Gets the adapter this output is attached.

    public GraphicsAdapter Adapter { get; }
    Property Value
    Type Description
    GraphicsAdapter

    The adapter.


    CurrentDisplayMode

    Gets the current display mode.

    public DisplayMode CurrentDisplayMode { get; }
    Property Value
    Type Description
    DisplayMode

    The current display mode.


    DesktopBounds

    Gets the desktop bounds of the current output.

    public Rectangle DesktopBounds { get; }
    Property Value
    Type Description
    Rectangle

    MonitorHandle

    Retrieves the handle of the monitor associated with this GraphicsOutput.

    public IntPtr MonitorHandle { get; }
    Property Value
    Type Description
    System.IntPtr

    SupportedDisplayModes

    Returns a collection of supported display modes for this GraphicsOutput.

    public DisplayMode[] SupportedDisplayModes { get; }
    Property Value
    Type Description
    DisplayMode[]
    | Improve this Doc View Source

    Methods


    FindClosestMatchingDisplayMode(GraphicsProfile[], DisplayMode)

    Find the display mode that most closely matches the requested display mode.

    public DisplayMode FindClosestMatchingDisplayMode(GraphicsProfile[] targetProfiles, DisplayMode mode)
    Parameters
    Type Name Description
    GraphicsProfile[] targetProfiles

    The target profile, as available formats are different depending on the feature level..

    DisplayMode mode

    The mode.

    Returns
    Type Description
    DisplayMode

    Returns the closes display mode.

    Remarks

    Direct3D devices require UNORM formats. This method finds the closest matching available display mode to the mode specified in pModeToMatch. Similarly ranked fields (i.e. all specified, or all unspecified, etc) are resolved in the following order. ScanlineOrdering Scaling Format Resolution RefreshRate When determining the closest value for a particular field, previously matched fields are used to filter the display mode list choices, and other fields are ignored. For example, when matching Resolution, the display mode list will have already been filtered by a certain ScanlineOrdering, Scaling, and Format, while RefreshRate is ignored. This ordering doesn't define the absolute ordering for every usage scenario of FindClosestMatchingMode, because the application can choose some values initially, effectively changing the order that fields are chosen. Fields of the display mode are matched one at a time, generally in a specified order. If a field is unspecified, FindClosestMatchingMode gravitates toward the values for the desktop related to this output. If this output is not part of the desktop, then the default desktop output is used to find values. If an application uses a fully unspecified display mode, FindClosestMatchingMode will typically return a display mode that matches the desktop settings for this output. Unspecified fields are lower priority than specified fields and will be resolved later than specified fields.


    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.Destroy()
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation