Add ability to create shader panels for target devices
このコミットが含まれているのは:
1 親
a86775f550
コミット
b0709526ef
3ファイル変更
+25
-6
検索条件に一致するファイルはありません
@@ -34,9 +34,18 @@ public sealed partial class AnimatedComputeShaderPanel : SwapChainPanel, IDispos
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="AnimatedComputeShaderPanel"/> instance.
|
||||
/// </summary>
|
||||
public unsafe AnimatedComputeShaderPanel()
|
||||
public AnimatedComputeShaderPanel()
|
||||
: this(GraphicsDevice.GetDefault())
|
||||
{
|
||||
this.swapChainManager = new SwapChainManager<AnimatedComputeShaderPanel>(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="AnimatedComputeShaderPanel"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="device">The <see cref="GraphicsDevice"/> instance to use to render frames.</param>
|
||||
public AnimatedComputeShaderPanel(GraphicsDevice device)
|
||||
{
|
||||
this.swapChainManager = new SwapChainManager<AnimatedComputeShaderPanel>(this, device);
|
||||
|
||||
this.Loaded += AnimatedComputeShaderPanel_Loaded;
|
||||
this.Unloaded += AnimatedComputeShaderPanel_Unloaded;
|
||||
|
||||
@@ -34,9 +34,18 @@ public sealed partial class ComputeShaderPanel : SwapChainPanel, IDisposable
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ComputeShaderPanel"/> instance.
|
||||
/// </summary>
|
||||
public unsafe ComputeShaderPanel()
|
||||
public ComputeShaderPanel()
|
||||
: this(GraphicsDevice.GetDefault())
|
||||
{
|
||||
this.swapChainManager = new SwapChainManager<ComputeShaderPanel>(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ComputeShaderPanel"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="device">The <see cref="GraphicsDevice"/> instance to use to render frames.</param>
|
||||
public ComputeShaderPanel(GraphicsDevice device)
|
||||
{
|
||||
this.swapChainManager = new SwapChainManager<ComputeShaderPanel>(this, device);
|
||||
|
||||
this.Loaded += ComputeShaderPanel_Loaded;
|
||||
this.Unloaded += ComputeShaderPanel_Unloaded;
|
||||
|
||||
@@ -231,10 +231,11 @@ internal sealed unsafe partial class SwapChainManager<TOwner> : NativeObject
|
||||
/// Initializes a new instance of the <see cref="SwapChainManager{TOwner}"/> type.
|
||||
/// </summary>
|
||||
/// <param name="owner">The input swap chain instance being used.</param>
|
||||
public SwapChainManager(TOwner owner)
|
||||
/// <param name="device">The <see cref="GraphicsDevice"/> instance to use to render frames.</param>
|
||||
public SwapChainManager(TOwner owner, GraphicsDevice device)
|
||||
{
|
||||
this.owner = owner;
|
||||
this.device = GraphicsDevice.GetDefault();
|
||||
this.device = device;
|
||||
|
||||
// Extract the ISwapChainPanelNative reference from the current panel, then query the
|
||||
// IDXGISwapChain reference just created and set that as the swap chain panel to use.
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする