Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 8b0e1a8

Browse files
authored
Merge pull request #908 from mrvux/clearview
Fix ClearView mapping
2 parents de25c69 + 0546907 commit 8b0e1a8

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

Source/SharpDX.Direct3D11/DeviceContext1.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,16 @@ public DeviceContext1(Device1 device) : base(IntPtr.Zero)
3131
{
3232
device.CreateDeferredContext1(0, this);
3333
}
34+
35+
/// <summary>
36+
/// Partially clears a view using an array of rectangles
37+
/// </summary>
38+
/// <param name="viewRef">View to clear</param>
39+
/// <param name="color">Clear color</param>
40+
/// <param name="rectangles">Rectangle areas</param>
41+
public void ClearView(SharpDX.Direct3D11.ResourceView viewRef, SharpDX.Mathematics.Interop.RawColor4 color, params SharpDX.Mathematics.Interop.RawRectangle[] rectangles)
42+
{
43+
ClearView(viewRef, color, rectangles, rectangles.Length);
44+
}
3445
}
3546
}

Source/SharpDX.Direct3D11/Mapping.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@
283283

284284
<map method="ID3D11VideoContext::GetDecoderBuffer" visibility="internal"/>
285285
<map param="ID3D11VideoContext::GetDecoderBuffer::ppBuffer" attribute="out"/>
286+
287+
<map method="ID3D11DeviceContext1::ClearView" visibility="public" />
288+
<map param="ID3D11DeviceContext1::ClearView::Color" type="SHARPDX_COLOR4" pointer="*" array="0" />
286289

287290
<map param="ID3D11DeviceContext2::.*Tile.*::Flags" type="D3D11_TILE_MAPPING_FLAG" />
288291
<map param="ID3D11DeviceContext2::UpdateTileMappings::pRangeFlags" type="D3D11_TILE_RANGE_FLAG" />

0 commit comments

Comments
 (0)