Skip to content

Commit

Permalink
Add missing XML documentation for GraphicsAdapter.Legacy (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
AristurtleDev authored May 31, 2024
1 parent c70483c commit 4ca0f6a
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions MonoGame.Framework/Platform/Graphics/GraphicsAdapter.Legacy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

namespace Microsoft.Xna.Framework.Graphics
{
/// <summary>
/// Provides methods to retrieve and manipulate graphics adapters.
/// </summary>
public sealed class GraphicsAdapter : IDisposable
{
/// <summary>
Expand Down Expand Up @@ -59,11 +62,15 @@ internal GraphicsAdapter()
}
#endif

/// <inheritdoc />
public void Dispose()
{
}

#if DESKTOPGL
/// <summary>
/// Gets a string used for presentation to the user.
/// </summary>
public string Description {
get {
try {
Expand All @@ -76,9 +83,16 @@ private set { }
}
#else
string _description = string.Empty;

/// <summary>
/// Gets a string used for presentation to the user.
/// </summary>
public string Description { get { return _description; } private set { _description = value; } }
#endif

/// <summary>
/// Gets the current display mode.
/// </summary>
public DisplayMode CurrentDisplayMode
{
get
Expand Down Expand Up @@ -112,11 +126,17 @@ public DisplayMode CurrentDisplayMode
}
}

/// <summary>
/// Gets the default adapter.
/// </summary>
public static GraphicsAdapter DefaultAdapter
{
get { return Adapters[0]; }
}

/// <summary>
/// Gets a read-only collection of available adapters on the system.
/// </summary>
public static ReadOnlyCollection<GraphicsAdapter> Adapters
{
get
Expand All @@ -136,7 +156,7 @@ public static ReadOnlyCollection<GraphicsAdapter> Adapters
}

/// <summary>
/// Used to request creation of the reference graphics device,
/// Used to request creation of the reference graphics device,
/// or the default hardware accelerated device (when set to false).
/// </summary>
/// <remarks>
Expand Down Expand Up @@ -299,6 +319,9 @@ public int SubSystemId
};
#endif

/// <summary>
/// Gets a collection of supported display modes for the current adapter.
/// </summary>
public DisplayModeCollection SupportedDisplayModes
{
get
Expand All @@ -315,7 +338,7 @@ public DisplayModeCollection SupportedDisplayModes
#if DESKTOPGL
_displayIndex = displayIndex;
modes.Clear();

var modeCount = Sdl.Display.GetNumDisplayModes(displayIndex);

for (int i = 0;i < modeCount;i++)
Expand Down Expand Up @@ -392,6 +415,14 @@ public bool IsWideScreen
}
}

/// <summary>
/// Returns a value that indicates whether the specified graphics profile is supported by the current adapter.
/// </summary>
/// <param name="graphicsProfile">The graphics profile to check for support.</param>
/// <returns></returns>
/// <exception cref="InvalidOperationException">
/// The <paramref name="graphicsProfile"/> parameter is not a valid <see cref="GraphicsProfile"/> enum value.
/// </exception>
public bool IsProfileSupported(GraphicsProfile graphicsProfile)
{
if(UseReferenceDevice)
Expand Down

0 comments on commit 4ca0f6a

Please sign in to comment.