Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EffectAnnotation()

unsafe Microsoft.Xna.Framework.Graphics.EffectAnnotation.EffectAnnotation ( ID3DXBaseEffect * parent,
sbyte * handle )
inlinepackage

Definition at line 37 of file EffectAnnotation.cs.

38 {
39 pEffect = parent;
41 base._002Ector();
42 ID3DXBaseEffect* ptr = pEffect;
43 System.Runtime.CompilerServices.Unsafe.SkipInit(out _D3DXPARAMETER_DESC d3DXPARAMETER_DESC);
44 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, _D3DXPARAMETER_DESC*, int>)(int)(*(uint*)(*(int*)ptr + 16)))((nint)ptr, _handle, &d3DXPARAMETER_DESC);
45 if (num < 0)
46 {
47 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
48 }
49 IntPtr ptr2 = (IntPtr)(void*)(int)(*(uint*)(&d3DXPARAMETER_DESC));
51 _semantic = ((System.Runtime.CompilerServices.Unsafe.As<_D3DXPARAMETER_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPARAMETER_DESC, 4)) == 0) ? string.Empty : Marshal.PtrToStringAnsi((IntPtr)(void*)(int)System.Runtime.CompilerServices.Unsafe.As<_D3DXPARAMETER_DESC, uint>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPARAMETER_DESC, 4))));
52 _rows = System.Runtime.CompilerServices.Unsafe.As<_D3DXPARAMETER_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPARAMETER_DESC, 16));
53 _columns = System.Runtime.CompilerServices.Unsafe.As<_D3DXPARAMETER_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPARAMETER_DESC, 20));
54 _paramClass = _003CModule_003E.ConvertDxParameterClassToXna(System.Runtime.CompilerServices.Unsafe.As<_D3DXPARAMETER_DESC, _D3DXPARAMETER_CLASS>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPARAMETER_DESC, 8)));
55 _paramType = _003CModule_003E.ConvertDxParameterTypeToXna(System.Runtime.CompilerServices.Unsafe.As<_D3DXPARAMETER_DESC, _D3DXPARAMETER_TYPE>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPARAMETER_DESC, 12)));
56 }
static unsafe? string PtrToStringAnsi(IntPtr ptr)
Definition Marshal.cs:630

References Microsoft.Xna.Framework.Graphics.EffectAnnotation._columns, Microsoft.Xna.Framework.Graphics.EffectAnnotation._handle, Microsoft.Xna.Framework.Graphics.EffectAnnotation._name, Microsoft.Xna.Framework.Graphics.EffectAnnotation._paramClass, Microsoft.Xna.Framework.Graphics.EffectAnnotation._paramType, Microsoft.Xna.Framework.Graphics.EffectAnnotation._rows, Microsoft.Xna.Framework.Graphics.EffectAnnotation._semantic, Microsoft.Xna.Framework.Graphics.GraphicsHelpers.GetExceptionFromResult(), System.handle, Microsoft.Xna.Framework.Graphics.EffectAnnotation.pEffect, and System.Runtime.InteropServices.Marshal.PtrToStringAnsi().