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

◆ ReleaseNativeObject() [1/2]

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

Implements Microsoft.Xna.Framework.Graphics.IGraphicsResource.

Reimplemented in Microsoft.Xna.Framework.Graphics.RenderTargetCube, and Microsoft.Xna.Framework.Graphics.RenderTargetCube.

Definition at line 455 of file TextureCube.cs.

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

References Microsoft.Xna.Framework.Graphics.GraphicsResource._internalHandle, Microsoft.Xna.Framework.Graphics.GraphicsResource._parent, Microsoft.Xna.Framework.Graphics.TextureCube.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.TextureCube._0021TextureCube(), Microsoft.Xna.Framework.Graphics.TextureCube.ReleaseNativeObject(), and Microsoft.Xna.Framework.Graphics.TextureCube.SaveDataForRecreation().