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

◆ InitializeDescription() [2/2]

unsafe void Microsoft.Xna.Framework.Graphics.TextureCube.InitializeDescription ( SurfaceFormat? format)
inlineprotected

Definition at line 317 of file TextureCube.cs.

318 {
319 IDirect3DCubeTexture9* ptr = pComPtr;
320 System.Runtime.CompilerServices.Unsafe.SkipInit(out _D3DSURFACE_DESC d3DSURFACE_DESC);
321 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, _D3DSURFACE_DESC*, int>)(int)(*(uint*)(*(int*)ptr + 68)))((nint)ptr, 0u, &d3DSURFACE_DESC);
322 if (num < 0)
323 {
324 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
325 }
326 if (!format.HasValue)
327 {
328 format = _003CModule_003E.ConvertWindowsFormatToXna(*(_D3DFORMAT*)(&d3DSURFACE_DESC));
329 }
330 _size = System.Runtime.CompilerServices.Unsafe.As<_D3DSURFACE_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DSURFACE_DESC, 24));
331 int shouldNotRecreate = ((System.Runtime.CompilerServices.Unsafe.As<_D3DSURFACE_DESC, int>(ref System.Runtime.CompilerServices.Unsafe.AddByteOffset(ref d3DSURFACE_DESC, 12)) == 0) ? 1 : 0);
332 _shouldNotRecreate = (byte)shouldNotRecreate != 0;
333 base.InitializeDescription(format.Value);
334 }
unsafe IDirect3DCubeTexture9 * pComPtr

References Microsoft.Xna.Framework.Graphics.TextureCube._shouldNotRecreate, Microsoft.Xna.Framework.Graphics.TextureCube._size, System.format, Microsoft.Xna.Framework.Graphics.GraphicsHelpers.GetExceptionFromResult(), and Microsoft.Xna.Framework.Graphics.TextureCube.pComPtr.

Referenced by Microsoft.Xna.Framework.Graphics.TextureCube.TextureCube(), Microsoft.Xna.Framework.Graphics.TextureCube.CreateTexture(), and Microsoft.Xna.Framework.Graphics.TextureCube.OnObjectCreation().