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

◆ Indices

unsafe IndexBuffer Microsoft.Xna.Framework.Graphics.GraphicsDevice.Indices
getset

Definition at line 223 of file GraphicsDevice.cs.

224 {
225 get
226 {
227 return _currentIB;
228 }
229 set
230 {
231 IntPtr intPtr = (IntPtr)pComPtr;
232 Helpers.CheckDisposed(this, intPtr);
233 if (value != null)
234 {
235 IntPtr intPtr2 = (IntPtr)value.pComPtr;
236 Helpers.CheckDisposed(value, intPtr2);
237 }
238 if (value == _currentIB)
239 {
240 return;
241 }
242 IDirect3DIndexBuffer9* ptr = ((value == null) ? null : value.pComPtr);
243 IDirect3DDevice9* ptr2 = pComPtr;
244 int num = ((delegate* unmanaged[Stdcall, Stdcall]<IntPtr, IDirect3DIndexBuffer9*, int>)(int)(*(uint*)(*(int*)ptr2 + 416)))((nint)ptr2, ptr);
245 if (num < 0)
246 {
247 if (value != null && value.GraphicsDevice != this)
248 {
249 throw new InvalidOperationException(FrameworkResources.InvalidDevice);
250 }
251 throw GraphicsHelpers.GetExceptionFromResult((uint)num);
252 }
254 }
255 }

Referenced by Microsoft.Xna.Framework.Graphics.SavedDeviceState.SavedDeviceState(), Terraria.DataStructures.SpriteDrawBuffer.Bind(), and Microsoft.Xna.Framework.Graphics.GraphicsDevice.Reset().