Move number of properties to shared constant
このコミットが含まれているのは:
1 親
b93029e8ca
コミット
f8e1cdd315
2ファイル変更
+9
-3
検索条件に一致するファイルはありません
@@ -151,7 +151,7 @@ public static unsafe class D2D1PixelShaderEffect
|
||||
fixed (char* pTransformMapperPropertyName = nameof(D2D1PixelShaderEffectProperty.TransformMapper))
|
||||
{
|
||||
// Prepare the effect binding functions
|
||||
D2D1_PROPERTY_BINDING* d2D1PropertyBinding = stackalloc D2D1_PROPERTY_BINDING[18];
|
||||
D2D1_PROPERTY_BINDING* d2D1PropertyBinding = stackalloc D2D1_PROPERTY_BINDING[(int)D2D1PixelShaderEffectProperty.NumberOfProperties];
|
||||
|
||||
// Property names
|
||||
d2D1PropertyBinding[0].propertyName = (ushort*)pBufferPropertyName;
|
||||
@@ -220,7 +220,7 @@ public static unsafe class D2D1PixelShaderEffect
|
||||
classId: pGuid,
|
||||
propertyXml: (ushort*)pXml,
|
||||
bindings: d2D1PropertyBinding,
|
||||
bindingsCount: 18,
|
||||
bindingsCount: D2D1PixelShaderEffectProperty.NumberOfProperties,
|
||||
effectFactory: PixelShaderEffect.For<T>.Instance.Factory).Assert();
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ public static unsafe class D2D1PixelShaderEffect
|
||||
writer.WriteRaw((byte)'\0');
|
||||
|
||||
// Bindings
|
||||
writer.WriteRaw(18);
|
||||
writer.WriteRaw(D2D1PixelShaderEffectProperty.NumberOfProperties);
|
||||
writer.WriteRaw("ConstantBuffer"u8);
|
||||
writer.WriteRaw((byte)'\0');
|
||||
writer.WriteRaw((nint)PixelShaderEffect.GetConstantBuffer);
|
||||
|
||||
@@ -122,4 +122,10 @@ public static class D2D1PixelShaderEffectProperty
|
||||
/// <para>For more info, see <see href="https://learn.microsoft.com/en-us/windows/win32/api/d2d1_1/nf-d2d1_1-id2d1properties-setvalue(uint32_d2d1_property_type_constbyte_uint32)"/>.</para>
|
||||
/// </remarks>
|
||||
public const uint TransformMapper = 17;
|
||||
|
||||
/// <summary>
|
||||
/// The total number of properties.
|
||||
/// </summary>
|
||||
/// <remarks>This should always be the value of the last property above, plus 1.</remarks>
|
||||
internal const uint NumberOfProperties = 18;
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする