Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ RecreateAndPopulateObject() [1/2]

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

Implements Microsoft.Xna.Framework.Graphics.IGraphicsResource.

Definition at line 419 of file Texture3D.cs.

420 {
422 {
423 return 0;
424 }
425 if (pComPtr != null)
426 {
427 return -2147467259;
428 }
429 fixed (IDirect3DVolumeTexture9** ptr2 = &pComPtr)
430 {
431 IDirect3DDevice9* ptr = _parent.pComPtr;
432 int num = *(int*)ptr + 96;
433 int num2 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, uint, uint, uint, uint, _D3DFORMAT, _D3DPOOL, IDirect3DVolumeTexture9**, void**, int>)(int)(*(uint*)num))((nint)ptr, (uint)_width, (uint)_height, (uint)_depth, (uint)_levelCount, 0u, _003CModule_003E.ConvertXnaFormatToWindows(_format), (_D3DPOOL)1, ptr2, null);
434 if (num2 >= 0)
435 {
436 num2 = CreateStateWrapper();
437 if (num2 >= 0)
438 {
439 num2 = CopyOrRestoreData(isStoring: false);
440 if (num2 >= 0)
441 {
443 }
444 }
446 }
447 alreadyRecreated = true;
448 return num2;
449 }
450 }
unsafe void AddTrackedObject(object managedObject, void *pComPtr, uint resourceManagementMode, ulong handle, ref ulong updatedHandle)
unsafe IDirect3DVolumeTexture9 * pComPtr
Definition Texture3D.cs:18
unsafe int CopyOrRestoreData([MarshalAs(UnmanagedType.U1)] bool isStoring)
Definition Texture3D.cs:480

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

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