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

◆ GetManagedObject()

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

Definition at line 401 of file IndexBuffer.cs.

402 {
403 IndexBuffer indexBuffer = pDevice.Resources.GetCachedObject(pInterface) as IndexBuffer;
404 if (indexBuffer != null)
405 {
406 ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint>)(int)(*(uint*)(*(int*)pInterface + 8)))((nint)pInterface);
407 indexBuffer.isDisposed = false;
408 GC.ReRegisterForFinalize(indexBuffer);
409 }
410 else
411 {
412 indexBuffer = new IndexBuffer(pInterface, pDevice);
413 pDevice.Resources.AddTrackedObject(indexBuffer, pInterface, pool, 0uL, ref indexBuffer._internalHandle);
414 }
415 return indexBuffer;
416 }
static void ReRegisterForFinalize(object obj)
Definition GC.cs:214
Definition GC.cs:8

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