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

◆ GetManagedObject()

static unsafe Texture3D Microsoft.Xna.Framework.Graphics.Texture3D.GetManagedObject ( IDirect3DVolumeTexture9 * pInterface,
GraphicsDevice pDevice,
uint pool )
inlinestaticpackage

Definition at line 617 of file Texture3D.cs.

618 {
619 Texture3D texture3D = pDevice.Resources.GetCachedObject(pInterface) as Texture3D;
620 if (texture3D != null)
621 {
622 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint>)(int)(*(uint*)(*(int*)pInterface + 8)))((nint)pInterface);
623 texture3D.isDisposed = false;
624 GC.ReRegisterForFinalize(texture3D);
625 }
626 else
627 {
628 texture3D = new Texture3D(pInterface, pDevice);
629 pDevice.Resources.AddTrackedObject(texture3D, pInterface, pool, 0uL, ref texture3D._internalHandle);
630 }
631 return texture3D;
632 }
static void ReRegisterForFinalize(object obj)
Definition GC.cs:214
Definition GC.cs:8

References Microsoft.Xna.Framework.Graphics.GraphicsResource._internalHandle, Microsoft.Xna.Framework.Graphics.DeviceResourceManager.AddTrackedObject(), Microsoft.Xna.Framework.Graphics.DeviceResourceManager.GetCachedObject(), System.GC.ReRegisterForFinalize(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.Resources, and Microsoft.Xna.Framework.Graphics.Texture3D.

Referenced by Microsoft.Xna.Framework.Graphics.EffectParameter.GetValueTexture3D().