namespace ComputeSharp.D2D1.Interop; /// /// A type containing info on a description for a given D2D1 pixel shader input resource. /// /// /// This type exposes the values that can be set via ID2D1RenderInfo::SetInputDescription. /// For more info, see . /// public readonly struct D2D1InputDescription { /// /// The index of the resource the description belongs to. /// /// /// This field and the ones below are explicity used because this type is in the type layout of . /// Since that type is used in an unmanaged context, MCG will produce a shadow copy to inform the runtime marshaller. Such a shallow copy /// cannot process the type if it has unspeakable names in any of its members, which is the case for the generated fields. As such, this /// type has to use explicit fields here and not readonly autoproperties, or compiling a project using ComputeSharp.D2D1 would fail on UWP. /// private readonly int index; /// /// The type of filter to apply to the input texture. /// private readonly D2D1Filter filter; /// /// The mip level to retrieve from the upstream transform, if specified. /// private readonly int levelOfDetailCount; /// /// Creates a new instance with the specified parameters. /// /// The index of the resource the description belongs to. /// The type of filter to apply to the input texture. /// The mip level to retrieve from the upstream transform, if specified. internal D2D1InputDescription(int index, D2D1Filter filter, int levelOfDetailCount) { this.index = index; this.filter = filter; this.levelOfDetailCount = levelOfDetailCount; } /// /// Gets the index of the resource the description belongs to. /// public int Index => this.index; /// /// Gets the type of filter to apply to the input texture. /// public D2D1Filter Filter => this.filter; /// /// Gets the mip level to retrieve from the upstream transform, if specified. /// public int LevelOfDetailCount => this.levelOfDetailCount; }