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

◆ RecreateAndPopulateObject() [1/2]

unsafe override int Microsoft.Xna.Framework.Graphics.DynamicIndexBuffer.RecreateAndPopulateObject ( )
inlinepackagevirtual

Reimplemented from Microsoft.Xna.Framework.Graphics.IndexBuffer.

Definition at line 106 of file DynamicIndexBuffer.cs.

107 {
108 if (pComPtr != null)
109 {
110 return -2147467259;
111 }
112 if (_bufferSize == 0)
113 {
114 return -2147467259;
115 }
116 fixed (IDirect3DIndexBuffer9** ptr2 = &pComPtr)
117 {
118 _D3DFORMAT d3DFORMAT = ((_indexSize == 4) ? ((_D3DFORMAT)102) : ((_D3DFORMAT)101));
119 GraphicsDevice parent = _parent;
120 IDirect3DDevice9* ptr = parent.pComPtr;
121 GraphicsDevice graphicsDevice = parent;
122 int num = *(int*)ptr + 108;
123 int num2 = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, uint, uint, _D3DFORMAT, _D3DPOOL, IDirect3DIndexBuffer9**, void**, int>)(int)(*(uint*)num))((nint)ptr, _bufferSize, graphicsDevice.GetBufferUsage(_usage) | 0x200u, d3DFORMAT, (_D3DPOOL)0, ptr2, null);
124 if (num2 >= 0)
125 {
127 }
128 return num2;
129 }
130 }
unsafe void AddTrackedObject(object managedObject, void *pComPtr, uint resourceManagementMode, ulong handle, ref ulong updatedHandle)
unsafe IDirect3DIndexBuffer9 * pComPtr

References Microsoft.Xna.Framework.Graphics.IndexBuffer._bufferSize, Microsoft.Xna.Framework.Graphics.IndexBuffer._indexSize, Microsoft.Xna.Framework.Graphics.GraphicsResource._internalHandle, Microsoft.Xna.Framework.Graphics.GraphicsResource._parent, Microsoft.Xna.Framework.Graphics.IndexBuffer._usage, Microsoft.Xna.Framework.Graphics.DeviceResourceManager.AddTrackedObject(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.GetBufferUsage(), Microsoft.Xna.Framework.Graphics.GraphicsDevice.pComPtr, Microsoft.Xna.Framework.Graphics.IndexBuffer.pComPtr, and Microsoft.Xna.Framework.Graphics.GraphicsDevice.Resources.

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