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

Commit

Permalink
[Direct3D11] adaptation mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSt committed Apr 9, 2017
1 parent f7b0bb5 commit fd878cc
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Source/SharpDX.Direct3D11/Device5.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;

namespace SharpDX.Direct3D11
{
public partial class Device5
{
/// <summary>
/// Opens a handle for a shared fence by using resourceHandle.
/// </summary>
/// <param name="resourceHandle">The handle that was returned by a call to ID3D11Fence::CreateSharedHandle or ID3D12Device::CreateSharedHandle</param>
/// <returns>Fence</returns>
public Fence OpenSharedFence(IntPtr resourceHandle)
{
IntPtr temp;
OpenSharedFence(resourceHandle, Utilities.GetGuidFromType(typeof(Fence)), out temp);
return CppObject.FromPointer<Fence>(temp);
}
}
}
20 changes: 20 additions & 0 deletions Source/SharpDX.Direct3D11/Fence.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

namespace SharpDX.Direct3D11
{
public partial class Fence
{
/// <summary>
/// Constructs a new <see cref = "T:SharpDX.Direct3D11.Fence" />
/// </summary>
/// <param name = "device">The device with which to associate the state object.</param>
/// <param name="initialValue">The initial value for the fence.</param>
/// <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>
/// <returns>The newly created object.</returns>
public Fence(Device5 device, long initialValue, FenceFlags flags)
: base(IntPtr.Zero)
{
device.CreateFence(initialValue, flags, Utilities.GetGuidFromType(typeof(Fence)), this);
}
}
}
6 changes: 6 additions & 0 deletions Source/SharpDX.Direct3D11/Mapping.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@

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

<map method="ID3D11Device5::OpenSharedFence" visibility="internal" />

<map method="ID3D11Device5::CreateFence" visibility="internal" />
<map param="ID3D11Device5::CreateFence::ppFence" type="ID3D11Fence" attribute="out fast"/>
<map param="ID3D11Fence::CreateSharedHandle::pHandle" return="true" />

<!--
// *****************************************************************
// D3D11 Functions
Expand Down
Binary file modified Source/Tools/SharpGen/MSDNDoc.zip
Binary file not shown.

0 comments on commit fd878cc

Please sign in to comment.