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

◆ ReleaseNativeObject() [1/2]

virtual unsafe void Microsoft.Xna.Framework.Graphics.Texture3D.ReleaseNativeObject ( [MarshalAs(UnmanagedType.U1)] bool disposeManagedResource)
inlinepackagevirtual

Implements Microsoft.Xna.Framework.Graphics.IGraphicsResource.

Definition at line 458 of file Texture3D.cs.

459 {
460 StateTrackerTexture* ptr = pStateTracker;
461 if (ptr != null)
462 {
463 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint>)(int)(*(uint*)(*(int*)ptr + 8)))((nint)ptr);
464 pStateTracker = null;
465 }
466 GraphicsDevice parent = _parent;
467 if (parent != null && pComPtr != null)
468 {
469 parent.Resources.ReleaseAllReferences(_internalHandle, disposeManagedResource);
470 }
471 pComPtr = null;
472 }
unsafe void ReleaseAllReferences(ulong handle, [MarshalAs(UnmanagedType.U1)] bool dispose)
unsafe IDirect3DVolumeTexture9 * pComPtr
Definition Texture3D.cs:18
unsafe StateTrackerTexture * pStateTracker
Definition Texture.cs:20

References Microsoft.Xna.Framework.Graphics.GraphicsResource._internalHandle, Microsoft.Xna.Framework.Graphics.GraphicsResource._parent, Microsoft.Xna.Framework.Graphics.Texture3D.pComPtr, Microsoft.Xna.Framework.Graphics.Texture.pStateTracker, Microsoft.Xna.Framework.Graphics.DeviceResourceManager.ReleaseAllReferences(), and Microsoft.Xna.Framework.Graphics.GraphicsDevice.Resources.

Referenced by Microsoft.Xna.Framework.Graphics.Texture3D._0021Texture3D(), Microsoft.Xna.Framework.Graphics.Texture3D.ReleaseNativeObject(), and Microsoft.Xna.Framework.Graphics.Texture3D.SaveDataForRecreation().