Skip to content

Add [D2DEffectAuthor], [D2DEffectCategory] and [D2DEffectDescription] - #566

Merged
Sergio0694 merged 7 commits into
mainfrom
dev/extended-effect-metadata
Sep 27, 2023
Merged

Sergio0694 merged 7 commits into
mainfrom
dev/extended-effect-metadata

Conversation

@Sergio0694

Copy link
Copy Markdown
Owner

Description

This PR adds new attributes to customize all remaining metadata properties of D2D pixel shader effects.

API breakdown

namespace ComputeSharp.D2D1
{
    [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
    public sealed class D2DEffectAuthorAttribute : Attribute
    {
        public D2DEffectAuthorAttribute(string value);
    
        public string Value { get; }
    }
    
    [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
    public sealed class D2DEffectCategoryAttribute : Attribute
    {
        public D2DEffectCategoryAttribute(string value);
    
        public string Value { get; }
    }
    
    [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)]
    public sealed class D2DEffectDescriptionAttribute : Attribute
    {
        public D2DEffectDescriptionAttribute(string value);
    
        public string Value { get; }
    }
}

namespace ComputeSharp.D2D1.Interop
{
    public static class D2D1PixelShaderEffect
    {
        public static string? GetEffectDescription<T>() where T : unmanaged, ID2D1PixelShader;
        public static string? GetEffectCategory<T>() where T : unmanaged, ID2D1PixelShader;
        public static string? GetEffectAuthor<T>() where T : unmanaged, ID2D1PixelShader;
}

@Sergio0694 Sergio0694 added the feature 🎉 A brand new feature for ComputeSharp label Sep 27, 2023
@Sergio0694
Sergio0694 merged commit 9311348 into main Sep 27, 2023
@Sergio0694
Sergio0694 deleted the dev/extended-effect-metadata branch September 27, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 🎉 A brand new feature for ComputeSharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant