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

◆ GetManagedObject()

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

Definition at line 2588 of file GraphicsDevice.cs.

2589 {
2590 GraphicsDevice graphicsDevice = pDevice.pResourceManager.GetCachedObject(pInterface) as GraphicsDevice;
2591 if (graphicsDevice != null)
2592 {
2593 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint>)(int)(*(uint*)(*(int*)pInterface + 8)))((nint)pInterface);
2594 graphicsDevice.isDisposed = false;
2595 GC.ReRegisterForFinalize(graphicsDevice);
2596 }
2597 else
2598 {
2599 graphicsDevice = new GraphicsDevice(pInterface, pDevice);
2600 pDevice.pResourceManager.AddTrackedObject(graphicsDevice, pInterface, pool, 0uL, ref graphicsDevice._internalHandle);
2601 }
2602 return graphicsDevice;
2603 }
unsafe GraphicsDevice(IDirect3DDevice9 *pInterface, GraphicsDevice pDevice)
static void ReRegisterForFinalize(object obj)
Definition GC.cs:214
Definition GC.cs:8

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