MTLVertexBufferLayoutDescriptor.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using static Veldrid.MetalBindings.ObjectiveCRuntime;
  3. namespace Veldrid.MetalBindings
  4. {
  5. public struct MTLVertexBufferLayoutDescriptor
  6. {
  7. public readonly IntPtr NativePtr;
  8. public MTLVertexBufferLayoutDescriptor(IntPtr ptr) => NativePtr = ptr;
  9. public MTLVertexStepFunction stepFunction
  10. {
  11. get => (MTLVertexStepFunction)uint_objc_msgSend(NativePtr, sel_stepFunction);
  12. set => objc_msgSend(NativePtr, sel_setStepFunction, (uint)value);
  13. }
  14. public UIntPtr stride
  15. {
  16. get => UIntPtr_objc_msgSend(NativePtr, sel_stride);
  17. set => objc_msgSend(NativePtr, sel_setStride, value);
  18. }
  19. public UIntPtr stepRate
  20. {
  21. get => UIntPtr_objc_msgSend(NativePtr, sel_stepRate);
  22. set => objc_msgSend(NativePtr, sel_setStepRate, value);
  23. }
  24. private static readonly Selector sel_stepFunction = "stepFunction";
  25. private static readonly Selector sel_setStepFunction = "setStepFunction:";
  26. private static readonly Selector sel_stride = "stride";
  27. private static readonly Selector sel_setStride = "setStride:";
  28. private static readonly Selector sel_stepRate = "stepRate";
  29. private static readonly Selector sel_setStepRate = "setStepRate:";
  30. }
  31. }