using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TerraFX.Interop.DirectX;
using TerraFX.Interop.Windows;
#pragma warning disable CS0649
namespace ComputeSharp.D2D1.Shaders.Interop.Effects.ResourceManagers;
///
/// The internal resource texture manager type to use with built-in effects.
///
internal unsafe struct ID2D1ResourceTextureManagerInternal
{
///
/// Gets the for ID2D1ResourceTextureManagerInternal (5CBB1024-8EA1-4689-81BF-8AD190B5EF5D).
///
public static ref readonly Guid Guid
{
get
{
ReadOnlySpan data = new byte[] {
0x5C, 0xBB, 0x10, 0x24,
0x8E, 0xA1,
0x46, 0x89,
0x81, 0xBF,
0x8A,
0xD1,
0x90,
0xB5,
0xEF,
0x5D
};
return ref Unsafe.As(ref MemoryMarshal.GetReference(data));
}
}
///
/// The vtable for the current instance.
///
private readonly void** lpVtbl;
///
/// Sets the for the current ID2D1ResourceTextureManagerInternal instance.
///
/// The input for the manager.
/// An for the operation.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public int SetEffectContext(ID2D1EffectContext* effectContext)
{
return
((delegate* unmanaged[Stdcall])this.lpVtbl[3])(
(ID2D1ResourceTextureManagerInternal*)Unsafe.AsPointer(ref this),
effectContext);
}
///
/// Gets the instance held by the manager.
///
/// The resulting instance.
/// An for the operation.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public int GetResourceTexture(ID2D1ResourceTexture** resourceTexture)
{
return
((delegate* unmanaged[Stdcall])this.lpVtbl[4])(
(ID2D1ResourceTextureManagerInternal*)Unsafe.AsPointer(ref this),
resourceTexture);
}
}