535 {
537 if (paramClass != 0 && paramClass != EffectParameterClass.Vector && paramClass != EffectParameterClass.Matrix)
538 {
540 }
541 if (
value !=
null && (nint)
value.LongLength > 0)
542 {
543 if (paramClass == EffectParameterClass.Matrix)
544 {
546 int num =
_rows * columns;
549 {
553 {
554 try
555 {
556 int num3 = 0;
557 int num4 = 0;
559 if (0 < rows)
560 {
561 while (num3 < num2)
562 {
563 int num5 = 0;
565 if (0 < columns2)
566 {
567 while (num3 < num2)
568 {
569 *(
float*)((ref *(_003F*)((num4 * 4 + num5) * 4)) + (ref *(_003F*)ptr)) =
value[num3];
570 num3++;
571 num5++;
573 if (num5 >= columns2)
574 {
575 break;
576 }
577 }
578 }
579 num4++;
581 if (num4 >= rows)
582 {
583 break;
584 }
585 }
586 }
588 }
589 catch
590 {
591
592 ptr = null;
593 throw;
594 }
595 }
596 }
597 else
598 {
600 fixed (float* ptr2 = &valueMatrixArray[0].M11)
601 {
602 try
603 {
605 int num7 = 0;
606 int num8 = 0;
608 {
609 while (num7 < num6)
610 {
611 int num9 = 0;
613 if (0 < rows2)
614 {
615 while (num7 < num6)
616 {
617 int num10 = 0;
619 if (0 < columns3)
620 {
621 while (num7 < num6)
622 {
623 *(
float*)((ref *(_003F*)(((num8 * 4 + num9) * 4 + num10) * 4)) + (ref *(_003F*)ptr2)) =
value[num7];
624 num7++;
625 num10++;
627 if (num10 >= columns3)
628 {
629 break;
630 }
631 }
632 }
633 num9++;
635 if (num9 >= rows2)
636 {
637 break;
638 }
639 }
640 }
641 num8++;
643 {
644 break;
645 }
646 }
647 }
649 }
650 catch
651 {
652
653 ptr2 = null;
654 throw;
655 }
656 }
657 }
658 }
659 else
660 {
662 {
663 try
664 {
665 int num11 = *(
int*)
pEffect + 128;
666 int num12 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*,
float*, uint,
int>)(
int)(*(uint*)num11))((nint)
pEffect,
_handle, (
float*)ptr3, (uint)
value.Length);
667 if (num12 < 0)
668 {
669 throw GraphicsHelpers.GetExceptionFromResult((uint)num12);
670 }
671 }
672 catch
673 {
674
675 ptr3 = null;
676 throw;
677 }
678 }
679 }
680 }
681 else
682 {
683 ID3DXBaseEffect* ptr4 =
pEffect;
684 int num13 = ((delegate* unmanaged[Stdcall, Stdcall]<
IntPtr, sbyte*,
float*, uint,
int>)(
int)(*(uint*)(*(
int*)ptr4 + 128)))((nint)ptr4,
_handle,
null, 0u);
685 if (num13 < 0)
686 {
687 throw GraphicsHelpers.GetExceptionFromResult((uint)num13);
688 }
689 }
690 try
691 {
692 return;
693 }
694 catch
695 {
696
697 throw;
698 }
699 }
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)