Skip to content

Commit

Permalink
[Direct2D1] Fix issue for Matrix effect parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Jul 22, 2015
1 parent 4f5fb26 commit 6481a55
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Source/SharpDX.Direct2D1/PropertyBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static PropertyBinding Get(Type customEffectType, PropertyInfo propertyIn
binding.nativeGetSet = new NativeGetSetValue<int>(customEffectType, propertyInfo);
effectPropType = PropertyType.Bool;
}
else if (propTypeName.Contains("Vector2"))
else if (propTypeName.Contains("Vector2")) // Use string property name to allow external types (Mathematics, System Numerics...etc.)
{
binding.nativeGetSet = new NativeGetSetValue<RawVector2>(customEffectType, propertyInfo);
effectPropType = PropertyType.Vector2;
Expand Down Expand Up @@ -111,11 +111,6 @@ public static PropertyBinding Get(Type customEffectType, PropertyInfo propertyIn
binding.nativeGetSet = new NativeGetSetValue<RawColor4>(customEffectType, propertyInfo);
effectPropType = PropertyType.Vector4;
}
else if(propTypeName.Contains("Matrix"))
{
binding.nativeGetSet = new NativeGetSetValue<RawMatrix>(customEffectType, propertyInfo);
effectPropType = PropertyType.Matrix4x4;
}
else if(propTypeName.Contains("Matrix3x2"))
{
binding.nativeGetSet = new NativeGetSetValue<RawMatrix3x2>(customEffectType, propertyInfo);
Expand All @@ -126,7 +121,12 @@ public static PropertyBinding Get(Type customEffectType, PropertyInfo propertyIn
binding.nativeGetSet = new NativeGetSetValue<RawMatrix5x4>(customEffectType, propertyInfo);
effectPropType = PropertyType.Matrix5x4;
}
else if(Utilities.IsEnum(propType))
else if (propTypeName.Contains("Matrix"))
{
binding.nativeGetSet = new NativeGetSetValue<RawMatrix>(customEffectType, propertyInfo);
effectPropType = PropertyType.Matrix4x4;
}
else if (Utilities.IsEnum(propType))
{
// For enum, we are using int as a transient value
binding.nativeGetSet = new NativeGetSetValue<int>(customEffectType, propertyInfo);
Expand Down

0 comments on commit 6481a55

Please sign in to comment.