Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add D2D1PixelShader.CreateFromConstantBuffer<T>() APIs #584

Merged
merged 2 commits into from
Sep 30, 2023

Conversation

Sergio0694
Copy link
Owner

Description

This PR adds two new D2D1PixelShader APIs to create shader values from constant buffer data.

API breakdown

namespace ComputeSharp.D2D1.Interop;

public static class PixelShaderEffect
{
    public static T CreateFromConstantBuffer<T>(ReadOnlySpan<byte> span)
        where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>;

    public static bool TryCreateFromConstantBuffer<T>(ReadOnlySpan<byte> span, out T shader)
        where T : unmanaged, ID2D1PixelShader, ID2D1PixelShaderDescriptor<T>;
}

@Sergio0694 Sergio0694 added the feature 🎉 A brand new feature for ComputeSharp label Sep 30, 2023
@Sergio0694 Sergio0694 merged commit b19a517 into main Sep 30, 2023
@Sergio0694 Sergio0694 deleted the dev/create-from-buffer-apis branch September 30, 2023 19:48
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