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

◆ CreateStateWrapper()

unsafe int Microsoft.Xna.Framework.Graphics.Texture.CreateStateWrapper ( )
inlineprotectedinherited

Definition at line 51 of file Texture.cs.

52 {
53 ProfileCapabilities profileCapabilities = _parent._profileCapabilities;
54 bool flag = profileCapabilities.ValidVertexTextureFormats.Contains(_format);
55 bool flag2 = profileCapabilities.InvalidFilterFormats.Contains(_format);
56 StateTrackerTexture* ptr = (StateTrackerTexture*)_003CModule_003E.@new(28u, (nothrow_t*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.std_002Enothrow));
57 StateTrackerTexture* ptr2;
58 try
59 {
60 ptr2 = ((ptr == null) ? null : _003CModule_003E.Microsoft_002EXna_002EFramework_002EGraphics_002EStateTrackerTexture_002E_007Bctor_007D(ptr, GetComPtr(), (uint)_format, flag, flag2, MustClamp));
61 }
62 catch
63 {
64 //try-fault
65 _003CModule_003E.delete(ptr, (nothrow_t*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref _003CModule_003E.std_002Enothrow));
66 throw;
67 }
68 pStateTracker = ptr2;
69 return (ptr2 == null) ? (-2147024882) : 0;
70 }
unsafe IDirect3DBaseTexture9 * GetComPtr()
unsafe StateTrackerTexture * pStateTracker
Definition Texture.cs:20

References Microsoft.Xna.Framework.Graphics.Texture._format, Microsoft.Xna.Framework.Graphics.GraphicsResource._parent, Microsoft.Xna.Framework.Graphics.GraphicsDevice._profileCapabilities, System.Collections.Generic.List< T >.Contains(), Microsoft.Xna.Framework.Graphics.Texture.GetComPtr(), Microsoft.Xna.Framework.Graphics.ProfileCapabilities.InvalidFilterFormats, Microsoft.Xna.Framework.Graphics.Texture.MustClamp, Microsoft.Xna.Framework.Graphics.Texture.pStateTracker, and Microsoft.Xna.Framework.Graphics.ProfileCapabilities.ValidVertexTextureFormats.

Referenced by Microsoft.Xna.Framework.Graphics.Texture.InitializeDescription(), Microsoft.Xna.Framework.Graphics.Texture2D.RecreateAndPopulateObject(), Microsoft.Xna.Framework.Graphics.Texture3D.RecreateAndPopulateObject(), and Microsoft.Xna.Framework.Graphics.TextureCube.RecreateAndPopulateObject().