using System;
using CommunityToolkit.Mvvm.ComponentModel;
using ComputeSharp.SwapChain.Core.Shaders;
#if WINDOWS_UWP
using ComputeSharp.Uwp;
#else
using ComputeSharp.WinUI;
#endif
namespace ComputeSharp.SwapChain.Core.ViewModels;
///
/// A viewmodel for a compute shader.
///
public sealed partial class ShaderRunnerViewModel : ObservableObject
{
///
/// Creates a new instance.
///
/// The instance for the actual shader to execute.
/// The instance to execute.
/// The instance to execute.
public ShaderRunnerViewModel(Type shaderType, IShaderRunner shaderRunner, ID2D1ShaderRunner d2D1ShaderRunner)
{
ShaderType = shaderType;
ShaderRunner = shaderRunner;
D2D1ShaderRunner = d2D1ShaderRunner;
}
///
/// Gets the instance for the actual shader to execute.
///
public Type ShaderType { get; }
///
/// Gets the instance to execute.
///
public IShaderRunner ShaderRunner { get; }
///
/// Gets the instance to execute.
///
public ID2D1ShaderRunner D2D1ShaderRunner { get; }
///
/// Gets or sets whether the current shader is selected.
///
[ObservableProperty]
private bool isSelected;
}