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

◆ RecreateAndPopulateObject() [1/2]

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

Implements Microsoft.Xna.Framework.Graphics.IGraphicsResource.

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

Definition at line 412 of file TextureCube.cs.

413 {
415 {
416 return 0;
417 }
419 {
420 return 0;
421 }
422 if (pComPtr != null)
423 {
424 return -2147467259;
425 }
426 fixed (IDirect3DCubeTexture9** ptr2 = &pComPtr)
427 {
428 IDirect3DDevice9* ptr = _parent.pComPtr;
429 int num = *(int*)ptr + 100;
430 int num2 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, uint, uint, _D3DFORMAT, _D3DPOOL, IDirect3DCubeTexture9**, void**, int>)(int)(*(uint*)num))((nint)ptr, (uint)_size, (uint)_levelCount, 0u, _003CModule_003E.ConvertXnaFormatToWindows(_format), (_D3DPOOL)1, ptr2, null);
431 if (num2 >= 0)
432 {
433 num2 = CreateStateWrapper();
434 if (num2 >= 0)
435 {
436 num2 = CopyOrRestoreData(isStoring: false);
437 if (num2 >= 0)
438 {
440 }
441 }
443 }
444 alreadyRecreated = true;
445 return num2;
446 }
447 }
unsafe void AddTrackedObject(object managedObject, void *pComPtr, uint resourceManagementMode, ulong handle, ref ulong updatedHandle)
unsafe IDirect3DCubeTexture9 * pComPtr
unsafe int CopyOrRestoreData([MarshalAs(UnmanagedType.U1)] bool isStoring)

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

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