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

◆ RecreateAndPopulateObject() [1/2]

virtual unsafe int Microsoft.Xna.Framework.Graphics.Texture2D.RecreateAndPopulateObject ( )
inlinepackagevirtual

Implements Microsoft.Xna.Framework.Graphics.IGraphicsResource.

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

Definition at line 705 of file Texture2D.cs.

706 {
708 {
709 return 0;
710 }
712 {
713 return 0;
714 }
715 if (pComPtr != null)
716 {
717 return -2147467259;
718 }
719 fixed (IDirect3DTexture9** ptr2 = &pComPtr)
720 {
721 IDirect3DDevice9* ptr = _parent.pComPtr;
722 int num = *(int*)ptr + 92;
723 int num2 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, uint, uint, uint, _D3DFORMAT, _D3DPOOL, IDirect3DTexture9**, void**, int>)(int)(*(uint*)num))((nint)ptr, (uint)_width, (uint)_height, (uint)_levelCount, 0u, _003CModule_003E.ConvertXnaFormatToWindows(_format), (_D3DPOOL)1, ptr2, null);
724 if (num2 >= 0)
725 {
726 num2 = CreateStateWrapper();
727 if (num2 >= 0)
728 {
729 num2 = CopyOrRestoreData(isStoring: false);
730 if (num2 >= 0)
731 {
733 }
734 }
736 }
737 alreadyRecreated = true;
738 return num2;
739 }
740 }
unsafe void AddTrackedObject(object managedObject, void *pComPtr, uint resourceManagementMode, ulong handle, ref ulong updatedHandle)
unsafe int CopyOrRestoreData([MarshalAs(UnmanagedType.U1)] bool isStoring)
Definition Texture2D.cs:770
unsafe IDirect3DTexture9 * pComPtr
Definition Texture2D.cs:22

References Microsoft.Xna.Framework.Graphics.Texture._format, Microsoft.Xna.Framework.Graphics.Texture2D._height, Microsoft.Xna.Framework.Graphics.GraphicsResource._internalHandle, Microsoft.Xna.Framework.Graphics.Texture._levelCount, Microsoft.Xna.Framework.Graphics.GraphicsResource._parent, Microsoft.Xna.Framework.Graphics.Texture2D._shouldNotRecreate, Microsoft.Xna.Framework.Graphics.Texture2D._width, Microsoft.Xna.Framework.Graphics.DeviceResourceManager.AddTrackedObject(), Microsoft.Xna.Framework.Graphics.Texture.alreadyRecreated, Microsoft.Xna.Framework.Graphics.Texture2D.CleanupSavedData(), Microsoft.Xna.Framework.Graphics.Texture2D.CopyOrRestoreData(), Microsoft.Xna.Framework.Graphics.Texture.CreateStateWrapper(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.pComPtr, Microsoft.Xna.Framework.Graphics.Texture2D.pComPtr, and Microsoft.Xna.Framework.Graphics.GraphicsDevice.Resources.

Referenced by Microsoft.Xna.Framework.Graphics.Texture2D.RecreateAndPopulateObject().