800 {
802 if (paramClass != 0 && paramClass != EffectParameterClass.Vector && paramClass != EffectParameterClass.Matrix)
803 {
805 }
806 if (
value !=
null && (nint)
value.LongLength > 0)
807 {
808 if (paramClass == EffectParameterClass.Matrix)
809 {
811 int num =
_rows * columns;
814 {
818 {
819 try
820 {
821 int num3 = 0;
822 int num4 = 0;
824 if (0 < rows)
825 {
826 while (num3 < num2)
827 {
828 int num5 = 0;
830 if (0 < columns2)
831 {
832 while (num3 < num2)
833 {
834 float num6 =
value[num3];
835 *(float*)((ref *(_003F*)((num4 * 4 + num5) * 4)) + (ref *(_003F*)ptr)) = num6;
836 num3++;
837 num5++;
839 if (num5 >= columns2)
840 {
841 break;
842 }
843 }
844 }
845 num4++;
847 if (num4 >= rows)
848 {
849 break;
850 }
851 }
852 }
854 }
855 catch
856 {
857
858 ptr = null;
859 throw;
860 }
861 }
862 }
863 else
864 {
867 fixed (float* ptr2 = &valueMatrixArray[0].M11)
868 {
869 try
870 {
871 int num8 = 0;
872 int num9 = 0;
874 {
875 while (num8 < num7)
876 {
877 int num10 = 0;
879 if (0 < rows2)
880 {
881 while (num8 < num7)
882 {
883 int num11 = 0;
885 if (0 < columns3)
886 {
887 while (num8 < num7)
888 {
889 float num12 =
value[num8];
890 *(float*)((ref *(_003F*)(((num9 * 4 + num10) * 4 + num11) * 4)) + (ref *(_003F*)ptr2)) = num12;
891 num8++;
892 num11++;
894 if (num11 >= columns3)
895 {
896 break;
897 }
898 }
899 }
900 num10++;
902 if (num10 >= rows2)
903 {
904 break;
905 }
906 }
907 }
908 num9++;
910 {
911 break;
912 }
913 }
914 }
916 }
917 catch
918 {
919
920 ptr2 = null;
921 throw;
922 }
923 }
924 }
925 }
926 else
927 {
929 {
930 try
931 {
932 int num13 = *(
int*)
pEffect + 112;
933 int num14 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*,
int*, uint,
int>)(
int)(*(uint*)num13))((nint)
pEffect,
_handle, (
int*)ptr3, (uint)
value.Length);
934 if (num14 < 0)
935 {
936 throw GraphicsHelpers.GetExceptionFromResult((uint)num14);
937 }
938 }
939 catch
940 {
941
942 ptr3 = null;
943 throw;
944 }
945 }
946 }
947 }
948 else
949 {
950 ID3DXBaseEffect* ptr4 =
pEffect;
951 int num15 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*,
int*, uint,
int>)(
int)(*(uint*)(*(
int*)ptr4 + 112)))((nint)ptr4,
_handle,
null, 0u);
952 if (num15 < 0)
953 {
954 throw GraphicsHelpers.GetExceptionFromResult((uint)num15);
955 }
956 }
957 try
958 {
959 return;
960 }
961 catch
962 {
963
964 throw;
965 }
966 }
EffectParameterClass _paramClass
unsafe Matrix GetValueMatrix()
unsafe ID3DXBaseEffect * pEffect
unsafe void SetValue(Texture value)
EffectParameterCollection pElementCollection
unsafe Matrix[] GetValueMatrixArray(int count)
static byte Min(byte val1, byte val2)