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

◆ EffectPass()

unsafe Microsoft.Xna.Framework.Graphics.EffectPass.EffectPass ( ID3DXBaseEffect * parent,
EffectTechnique technique,
sbyte * Pass,
int index )
inlinepackage

Definition at line 34 of file EffectPass.cs.

35 {
36 _technique = technique;
37 pEffect = parent;
38 _handle = Pass;
39 _index = index;
40 base._002Ector();
41 ID3DXBaseEffect* ptr = pEffect;
42 System.Runtime.CompilerServices.Unsafe.SkipInit(out _D3DXPASS_DESC d3DXPASS_DESC);
43 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, _D3DXPASS_DESC*, int>)(int)(*(uint*)(*(int*)ptr + 24)))((nint)ptr, _handle, &d3DXPASS_DESC);
44 if (num < 0)
45 {
46 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
47 }
48 IntPtr ptr2 = (IntPtr)(void*)(int)(*(uint*)(&d3DXPASS_DESC));
50 pVertexShaderCode = (uint*)(int)System.Runtime.CompilerServices.Unsafe.As<_D3DXPASS_DESC, uint>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPASS_DESC, 8));
51 pPixelShaderCode = (uint*)(int)System.Runtime.CompilerServices.Unsafe.As<_D3DXPASS_DESC, uint>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPASS_DESC, 12));
52 pAnnotations = new EffectAnnotationCollection(pEffect, _handle, System.Runtime.CompilerServices.Unsafe.As<_D3DXPASS_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXPASS_DESC, 4)));
53 }
EffectAnnotationCollection pAnnotations
Definition EffectPass.cs:10
static unsafe? string PtrToStringAnsi(IntPtr ptr)
Definition Marshal.cs:630

References Microsoft.Xna.Framework.Graphics.EffectPass._handle, Microsoft.Xna.Framework.Graphics.EffectPass._index, Microsoft.Xna.Framework.Graphics.EffectPass._name, Microsoft.Xna.Framework.Graphics.EffectPass._technique, Microsoft.Xna.Framework.Graphics.GraphicsHelpers.GetExceptionFromResult(), System.index, Microsoft.Xna.Framework.Graphics.EffectPass.pAnnotations, Microsoft.Xna.Framework.Graphics.EffectPass.pEffect, Microsoft.Xna.Framework.Graphics.EffectPass.pPixelShaderCode, System.Runtime.InteropServices.Marshal.PtrToStringAnsi(), and Microsoft.Xna.Framework.Graphics.EffectPass.pVertexShaderCode.