diff --git a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs new file mode 100644 index 00000000..3697bb0b --- /dev/null +++ b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1/D2D1_EXTEND_MODE.cs @@ -0,0 +1,18 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/d2d1.h in the Windows SDK for Windows 10.0.22000.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.DirectX +{ + internal enum D2D1_EXTEND_MODE : uint + { + D2D1_EXTEND_MODE_CLAMP = 0, + + D2D1_EXTEND_MODE_WRAP = 1, + + D2D1_EXTEND_MODE_MIRROR = 2, + + D2D1_EXTEND_MODE_FORCE_DWORD = 0xffffffff, + } +} \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_RESOURCE_TEXTURE_PROPERTIES.cs b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_RESOURCE_TEXTURE_PROPERTIES.cs new file mode 100644 index 00000000..3885214c --- /dev/null +++ b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/D2D1_RESOURCE_TEXTURE_PROPERTIES.cs @@ -0,0 +1,25 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 +// Original source is Copyright © Microsoft. All rights reserved. + +namespace TerraFX.Interop.DirectX +{ + internal unsafe partial struct D2D1_RESOURCE_TEXTURE_PROPERTIES + { + [NativeTypeName("const UINT32 *")] + public uint* extents; + + [NativeTypeName("UINT32")] + public uint dimensions; + + public D2D1_BUFFER_PRECISION bufferPrecision; + + public D2D1_CHANNEL_DEPTH channelDepth; + + public D2D1_FILTER filter; + + [NativeTypeName("const D2D1_EXTEND_MODE *")] + public D2D1_EXTEND_MODE* extendModes; + } +} \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1EffectContext.cs b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1EffectContext.cs index ab8361cd..dfe7b3be 100644 --- a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1EffectContext.cs +++ b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1EffectContext.cs @@ -40,6 +40,13 @@ namespace TerraFX.Interop.DirectX return ((delegate* unmanaged[Stdcall])(lpVtbl[14]))((ID2D1EffectContext*)Unsafe.AsPointer(ref this), shaderId); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(15)] + public HRESULT CreateResourceTexture([NativeTypeName("const GUID *")] Guid* resourceId, [NativeTypeName("const D2D1_RESOURCE_TEXTURE_PROPERTIES *")] D2D1_RESOURCE_TEXTURE_PROPERTIES* resourceTextureProperties, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("const UINT32 *")] uint* strides, [NativeTypeName("UINT32")] uint dataSize, ID2D1ResourceTexture** resourceTexture) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[15]))((ID2D1EffectContext*)Unsafe.AsPointer(ref this), resourceId, resourceTextureProperties, data, strides, dataSize, resourceTexture); + } + [MethodImpl(MethodImplOptions.AggressiveInlining)] [VtblIndex(22)] public HRESULT CheckFeatureSupport(D2D1_FEATURE feature, void* featureSupportData, [NativeTypeName("UINT32")] uint featureSupportDataSize) diff --git a/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1ResourceTexture.cs b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1ResourceTexture.cs new file mode 100644 index 00000000..b93d792b --- /dev/null +++ b/src/TerraFX.Interop.Windows.D2D1/DirectX/um/d2d1effectauthor/ID2D1ResourceTexture.cs @@ -0,0 +1,53 @@ +// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. + +// Ported from um/d2d1effectauthor.h in the Windows SDK for Windows 10.0.22000.0 +// Original source is Copyright © Microsoft. All rights reserved. + +using System; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using TerraFX.Interop.Windows; + +namespace TerraFX.Interop.DirectX +{ + [Guid("688D15C3-02B0-438D-B13A-D1B44C32C39A")] + [NativeTypeName("struct ID2D1ResourceTexture : IUnknown")] + [NativeInheritance("IUnknown")] + internal unsafe partial struct ID2D1ResourceTexture + { + public void** lpVtbl; + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(0)] + public HRESULT QueryInterface([NativeTypeName("const IID &")] Guid* riid, void** ppvObject) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[0]))((ID2D1ResourceTexture*)Unsafe.AsPointer(ref this), riid, ppvObject); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(1)] + [return: NativeTypeName("ULONG")] + public uint AddRef() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[1]))((ID2D1ResourceTexture*)Unsafe.AsPointer(ref this)); + } + + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(2)] + [return: NativeTypeName("ULONG")] + public uint Release() + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[2]))((ID2D1ResourceTexture*)Unsafe.AsPointer(ref this)); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + [VtblIndex(3)] + public HRESULT Update([NativeTypeName("const UINT32 *")] uint* minimumExtents, [NativeTypeName("const UINT32 *")] uint* maximimumExtents, [NativeTypeName("const UINT32 *")] uint* strides, [NativeTypeName("UINT32")] uint dimensions, [NativeTypeName("const BYTE *")] byte* data, [NativeTypeName("UINT32")] uint dataCount) + { + return ((delegate* unmanaged[Stdcall])(lpVtbl[3]))((ID2D1ResourceTexture*)Unsafe.AsPointer(ref this), minimumExtents, maximimumExtents, strides, dimensions, data, dataCount); + } + } +} \ No newline at end of file diff --git a/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems b/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems index 130071e2..17030a02 100644 --- a/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems +++ b/src/TerraFX.Interop.Windows.D2D1/TerraFX.Interop.Windows.D2D1.projitems @@ -17,12 +17,15 @@ + + +