Add ID2D1DrawInfoUpdateContex binding type
このコミットが含まれているのは:
1 親
bc1a392e9f
コミット
0847e45219
1ファイル変更
+87
+87
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using TerraFX.Interop.Windows;
|
||||
|
||||
#pragma warning disable CS0649
|
||||
|
||||
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.TransformMapperManagers;
|
||||
|
||||
/// <summary>
|
||||
/// The updater for <see cref="TerraFX.Interop.DirectX.ID2D1DrawInfo"/> type to use with built-in effects.
|
||||
/// </summary>
|
||||
[Guid("430C5B40-AE16-485F-90E6-4FA4915144B6")]
|
||||
internal unsafe struct ID2D1DrawInfoUpdateContex
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="System.Guid"/> for <see cref="ID2D1DrawInfoUpdateContex"/> (<c>430C5B40-AE16-485F-90E6-4FA4915144B6</c>).
|
||||
/// </summary>
|
||||
public static ref readonly Guid Guid
|
||||
{
|
||||
get
|
||||
{
|
||||
ReadOnlySpan<byte> data = new byte[] {
|
||||
0x43, 0x0C, 0x5B, 0x40,
|
||||
0xAE, 0x16,
|
||||
0x48, 0x5F,
|
||||
0x90, 0xE6,
|
||||
0x4F,
|
||||
0xA4,
|
||||
0x91,
|
||||
0x51,
|
||||
0x44,
|
||||
0xB6
|
||||
};
|
||||
|
||||
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(data));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The vtable for the current instance.
|
||||
/// </summary>
|
||||
private readonly void** lpVtbl;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the size of the constant buffer for the current effect.
|
||||
/// </summary>
|
||||
/// <param name="size">The resulting size of the constant buffer.</param>
|
||||
/// <returns>An <see cref="HRESULT"/> for the operation.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public HRESULT GetConstantBufferSize(uint* size)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DrawInfoUpdateContex*, uint*, int>)this.lpVtbl[3])(
|
||||
(ID2D1DrawInfoUpdateContex*)Unsafe.AsPointer(ref this),
|
||||
size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the constant buffer data for the current effect.
|
||||
/// </summary>
|
||||
/// <param name="buffer">A pointer to the buffer to fill with the constant buffer data.</param>
|
||||
/// <param name="bufferCount">The size of the buffer provided through <paramref name="buffer"/>.</param>
|
||||
/// <returns>An <see cref="HRESULT"/> for the operation.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public HRESULT GetConstantBuffer(byte* buffer, uint bufferCount)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DrawInfoUpdateContex*, byte*, uint, int>)this.lpVtbl[4])(
|
||||
(ID2D1DrawInfoUpdateContex*)Unsafe.AsPointer(ref this),
|
||||
buffer,
|
||||
bufferCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the constant buffer data for the current effect.
|
||||
/// </summary>
|
||||
/// <param name="buffer">A pointer to the constant buffer data to use to update the effect.</param>
|
||||
/// <param name="bufferCount">The size of the buffer provided through <paramref name="buffer"/>.</param>
|
||||
/// <returns>An <see cref="HRESULT"/> for the operation.</returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public HRESULT SetConstantBuffer(byte* buffer, uint bufferCount)
|
||||
{
|
||||
return ((delegate* unmanaged[Stdcall]<ID2D1DrawInfoUpdateContex*, byte*, uint, int>)this.lpVtbl[5])(
|
||||
(ID2D1DrawInfoUpdateContex*)Unsafe.AsPointer(ref this),
|
||||
buffer,
|
||||
bufferCount);
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする