Rename PixelShaderEffect<T>.Value property to ConstantBuffer
このコミットが含まれているのは:
1 親
0855eca967
コミット
d28366f765
4ファイル変更
+9
-9
検索条件に一致するファイルはありません
@@ -194,7 +194,7 @@ unsafe partial class PixelShaderEffect<T>
|
||||
// Note: the resource texture managers are deliberately not read back, as the only supported way to set
|
||||
// those is directly from the current effect instance. As such, they'd all either be the same instances
|
||||
// that are already stored locally, or trying to retrieve them would just throw an exception.
|
||||
this.value = this.d2D1Effect.Get()->GetConstantBuffer<T>();
|
||||
this.constantBuffer = this.d2D1Effect.Get()->GetConstantBuffer<T>();
|
||||
this.transformMapper = this.d2D1Effect.Get()->GetTransformMapper<T>();
|
||||
this.cacheOutput = this.d2D1Effect.Get()->GetCachedProperty();
|
||||
this.d2D1BufferPrecision = this.d2D1Effect.Get()->GetPrecisionProperty();
|
||||
@@ -265,7 +265,7 @@ unsafe partial class PixelShaderEffect<T>
|
||||
}
|
||||
|
||||
// Set the constant buffer for the effect
|
||||
D2D1PixelShaderEffect.SetConstantBufferForD2D1Effect(this.d2D1Effect.Get(), in this.value);
|
||||
D2D1PixelShaderEffect.SetConstantBufferForD2D1Effect(this.d2D1Effect.Get(), in this.constantBuffer);
|
||||
|
||||
// If there is a transform mapper, set it in the effect
|
||||
if (this.transformMapper is not null)
|
||||
|
||||
@@ -22,15 +22,15 @@ unsafe partial class PixelShaderEffect<T>
|
||||
return this.d2D1Effect.Get() switch
|
||||
{
|
||||
not null => this.d2D1Effect.Get()->GetConstantBuffer<T>(),
|
||||
_ => this.value
|
||||
_ => this.constantBuffer
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the marshalled value for <see cref="Value"/>.
|
||||
/// Sets the marshalled value for <see cref="ConstantBuffer"/>.
|
||||
/// </summary>
|
||||
/// <param name="value">The value to set for <see cref="Value"/>.</param>
|
||||
/// <param name="value">The value to set for <see cref="ConstantBuffer"/>.</param>
|
||||
private void SetConstantBuffer(in T value)
|
||||
{
|
||||
using ReferenceTracker.Lease _0 = GetReferenceTracker().GetLease();
|
||||
@@ -45,7 +45,7 @@ unsafe partial class PixelShaderEffect<T>
|
||||
else
|
||||
{
|
||||
// Otherwise, just store the value locally
|
||||
this.value = value;
|
||||
this.constantBuffer = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ partial class PixelShaderEffect<T>
|
||||
/// <summary>
|
||||
/// Gets or sets the current <typeparamref name="T"/> value in use.
|
||||
/// </summary>
|
||||
public T Value
|
||||
public T ConstantBuffer
|
||||
{
|
||||
get => GetConstantBuffer();
|
||||
set => SetConstantBuffer(in value);
|
||||
|
||||
@@ -45,9 +45,9 @@ public sealed partial class PixelShaderEffect<T> : IReferenceTrackedObject, ICan
|
||||
private ComPtr<ID2D1Effect> d2D1Effect;
|
||||
|
||||
/// <summary>
|
||||
/// The backing field for <see cref="Value"/>.
|
||||
/// The backing field for <see cref="ConstantBuffer"/>.
|
||||
/// </summary>
|
||||
private T value;
|
||||
private T constantBuffer;
|
||||
|
||||
/// <summary>
|
||||
/// The backing field for <see cref="TransformMapper"/>.
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする