Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EffectTechnique.cs
Go to the documentation of this file.
1using System;
4
6
7public sealed class EffectTechnique
8{
9 internal Effect _parent;
10
12
14
15 internal unsafe ID3DXBaseEffect* pEffect;
16
17 internal unsafe sbyte* _handle;
18
19 internal string _name;
20
22
24
25 public string Name => _name;
26
27 internal unsafe EffectTechnique(ID3DXBaseEffect* parent, Effect effect, sbyte* technique)
28 {
29 _parent = effect;
30 pEffect = parent;
31 _handle = technique;
32 base._002Ector();
33 ID3DXBaseEffect* ptr = pEffect;
34 System.Runtime.CompilerServices.Unsafe.SkipInit(out _D3DXTECHNIQUE_DESC d3DXTECHNIQUE_DESC);
35 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, sbyte*, _D3DXTECHNIQUE_DESC*, int>)(int)(*(uint*)(*(int*)ptr + 20)))((nint)ptr, _handle, &d3DXTECHNIQUE_DESC);
36 if (num < 0)
37 {
39 }
40 IntPtr ptr2 = (IntPtr)(void*)(int)(*(uint*)(&d3DXTECHNIQUE_DESC));
42 pPasses = new EffectPassCollection(pEffect, this, System.Runtime.CompilerServices.Unsafe.As<_D3DXTECHNIQUE_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXTECHNIQUE_DESC, 4)));
43 pAnnotations = new EffectAnnotationCollection(pEffect, _handle, System.Runtime.CompilerServices.Unsafe.As<_D3DXTECHNIQUE_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DXTECHNIQUE_DESC, 8)));
44 }
45
46 internal unsafe void UpdateHandle(ID3DXBaseEffect* parent, sbyte* handle)
47 {
48 pEffect = parent;
52 }
53}
unsafe void UpdateParent(ID3DXBaseEffect *parent, sbyte *handle)
unsafe void UpdateParent(ID3DXBaseEffect *parent, sbyte *technique)
unsafe void UpdateHandle(ID3DXBaseEffect *parent, sbyte *handle)
unsafe EffectTechnique(ID3DXBaseEffect *parent, Effect effect, sbyte *technique)
static Exception GetExceptionFromResult(uint result)
static unsafe? string PtrToStringAnsi(IntPtr ptr)
Definition Marshal.cs:630