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

Commit fd878cc

Browse files
author
AndrewSt
committed
[Direct3D11] adaptation mapping
1 parent f7b0bb5 commit fd878cc

4 files changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System;
2+
3+
namespace SharpDX.Direct3D11
4+
{
5+
public partial class Device5
6+
{
7+
/// <summary>
8+
/// Opens a handle for a shared fence by using resourceHandle.
9+
/// </summary>
10+
/// <param name="resourceHandle">The handle that was returned by a call to ID3D11Fence::CreateSharedHandle or ID3D12Device::CreateSharedHandle</param>
11+
/// <returns>Fence</returns>
12+
public Fence OpenSharedFence(IntPtr resourceHandle)
13+
{
14+
IntPtr temp;
15+
OpenSharedFence(resourceHandle, Utilities.GetGuidFromType(typeof(Fence)), out temp);
16+
return CppObject.FromPointer<Fence>(temp);
17+
}
18+
}
19+
}

Source/SharpDX.Direct3D11/Fence.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using System;
2+
3+
namespace SharpDX.Direct3D11
4+
{
5+
public partial class Fence
6+
{
7+
/// <summary>
8+
/// Constructs a new <see cref = "T:SharpDX.Direct3D11.Fence" />
9+
/// </summary>
10+
/// <param name = "device">The device with which to associate the state object.</param>
11+
/// <param name="initialValue">The initial value for the fence.</param>
12+
/// <param name="flags">A combination of FenceFlags values that are combined by using a bitwise OR operation. The resulting value specifies options for the fence.</param>
13+
/// <returns>The newly created object.</returns>
14+
public Fence(Device5 device, long initialValue, FenceFlags flags)
15+
: base(IntPtr.Zero)
16+
{
17+
device.CreateFence(initialValue, flags, Utilities.GetGuidFromType(typeof(Fence)), this);
18+
}
19+
}
20+
}

Source/SharpDX.Direct3D11/Mapping.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,12 @@
293293

294294
<map param="ID3D11Device4::RegisterDeviceRemovedEvent::pdwCookie" return="true" />
295295

296+
<map method="ID3D11Device5::OpenSharedFence" visibility="internal" />
297+
298+
<map method="ID3D11Device5::CreateFence" visibility="internal" />
299+
<map param="ID3D11Device5::CreateFence::ppFence" type="ID3D11Fence" attribute="out fast"/>
300+
<map param="ID3D11Fence::CreateSharedHandle::pHandle" return="true" />
301+
296302
<!--
297303
// *****************************************************************
298304
// D3D11 Functions

Source/Tools/SharpGen/MSDNDoc.zip

26.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)