CAMetalDrawable.cs 421 B

1234567891011121314
  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 CAMetalDrawable
  8. {
  9. public readonly IntPtr NativePtr;
  10. public bool IsNull => NativePtr == IntPtr.Zero;
  11. public MTLTexture texture => objc_msgSend<MTLTexture>(NativePtr, Selectors.texture);
  12. }
  13. }