MTLRenderPassColorAttachmentDescriptorArray.cs 782 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Runtime.InteropServices;
  3. using static Veldrid.MetalBindings.ObjectiveCRuntime;
  4. namespace Veldrid.MetalBindings
  5. {
  6. [StructLayout(LayoutKind.Sequential)]
  7. public struct MTLRenderPassColorAttachmentDescriptorArray
  8. {
  9. public readonly IntPtr NativePtr;
  10. public MTLRenderPassColorAttachmentDescriptor this[uint index]
  11. {
  12. get
  13. {
  14. IntPtr value = IntPtr_objc_msgSend(NativePtr, Selectors.objectAtIndexedSubscript, (UIntPtr)index);
  15. return new MTLRenderPassColorAttachmentDescriptor(value);
  16. }
  17. set
  18. {
  19. objc_msgSend(NativePtr, Selectors.setObjectAtIndexedSubscript, value.NativePtr, (UIntPtr)index);
  20. }
  21. }
  22. }
  23. }