MTLRenderPipelineColorAttachmentDescriptorArray.cs 772 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 MTLRenderPipelineColorAttachmentDescriptorArray
  8. {
  9. public readonly IntPtr NativePtr;
  10. public MTLRenderPipelineColorAttachmentDescriptor this[uint index]
  11. {
  12. get
  13. {
  14. IntPtr ptr = IntPtr_objc_msgSend(NativePtr, Selectors.objectAtIndexedSubscript, index);
  15. return new MTLRenderPipelineColorAttachmentDescriptor(ptr);
  16. }
  17. set
  18. {
  19. objc_msgSend(NativePtr, Selectors.setObjectAtIndexedSubscript, value.NativePtr, index);
  20. }
  21. }
  22. }
  23. }