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

◆ GetValueString()

unsafe string Microsoft.Xna.Framework.Graphics.EffectParameter.GetValueString ( )
inline

Definition at line 2473 of file EffectParameter.cs.

2474 {
2475 EffectParameterType paramType = _paramType;
2476 if (paramType != EffectParameterType.String)
2477 {
2478 throw new InvalidCastException();
2479 }
2480 sbyte* ptr = null;
2481 ID3DXBaseEffect* ptr2 = pEffect;
2482 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, sbyte**, int>)(int)(*(uint*)(*(int*)ptr2 + 204)))((nint)ptr2, _handle, &ptr);
2483 if (num < 0)
2484 {
2485 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
2486 }
2487 return Marshal.PtrToStringAnsi((IntPtr)ptr);
2488 }
static unsafe? string PtrToStringAnsi(IntPtr ptr)
Definition Marshal.cs:630

References Microsoft.Xna.Framework.Graphics.EffectParameter._handle, Microsoft.Xna.Framework.Graphics.EffectParameter._paramType, Microsoft.Xna.Framework.Graphics.GraphicsHelpers.GetExceptionFromResult(), Microsoft.Xna.Framework.Graphics.EffectParameter.pEffect, and System.Runtime.InteropServices.Marshal.PtrToStringAnsi().

Referenced by Microsoft.Xna.Framework.Graphics.EffectAnnotation.GetValueString(), and Microsoft.Xna.Framework.Graphics.EffectParameter.SaveDataForRecreation().