Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nkast committed Feb 14, 2025
1 parent 8b45b32 commit f6580cd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Xna.Framework.Graphics/Graphics/GraphicsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,21 @@ internal PixelShader PixelShader
set { _strategy.PixelShader = value; }
}

/// <summary>
/// Retrieves the currently bound render targets as an array.
/// </summary>
/// <returns>An array of <see cref="RenderTargetBinding"/> representing the current render targets.</returns>

internal RenderTargetBinding[] GetRenderTargets()
{
return _strategy.GetRenderTargets();
}

/// <summary>
/// Copies the currently bound render targets into the provided array.
/// </summary>
/// <param name="bindings">The array to store the current render targets.</param>
/// <returns>The number of render targets copied.</returns>
public int GetRenderTargets(RenderTargetBinding[] bindings)
{
return _strategy.GetRenderTargets(bindings);
Expand Down
10 changes: 10 additions & 0 deletions src/Xna.Framework.Graphics/Graphics/GraphicsDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,21 @@ public void SetRenderTargets(params RenderTargetBinding[] renderTargets)
CurrentContext.SetRenderTargets(renderTargets);
}

/// <summary>
/// Retrieves the currently bound render targets as an array.
/// </summary>
/// <returns>An array of <see cref="RenderTargetBinding"/> representing the current render targets.</returns>

public RenderTargetBinding[] GetRenderTargets()
{
return CurrentContext.GetRenderTargets();
}

/// <summary>
/// Copies the currently bound render targets into the provided array.
/// </summary>
/// <param name="bindings">The array to store the current render targets.</param>
/// <returns>The number of render targets copied.</returns>
public int GetRenderTargets(RenderTargetBinding[] bindings)
{
return CurrentContext.GetRenderTargets(bindings);
Expand Down

0 comments on commit f6580cd

Please # to comment.