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

◆ GetManagedObject()

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

Definition at line 615 of file TextureCube.cs.

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

References Microsoft.Xna.Framework.Graphics.TextureCube.TextureCube(), 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.

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