2

Working with Apple Vision Pro SDK. When trying to reference MTKView in MetalKit I get MTKView is unavailable in xrOS.

I am trying to run the 'Pipeline to Render Primitives' code sample to discover MetalKit in VisionOS simulator. The MetalKit is available under visionOS in general but I see that MTKView is not specifically available. How can I run this sample code for visionOS? Is there different Metal sample code available for visionOS to try?

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
ZaEeM ZaFaR
  • 1,508
  • 17
  • 22

1 Answers1

2

At the moment MTKView is unsupported on visionOS – as you said it is clearly stated in the official documentation. So far, no SwiftUI view for Metal has been released. The short list of supported views is the following (Xcode 15 beta 5):

  • Model3D
  • RealityView
  • SceneView (2D)
  • SpriteView
  • Map
  • WKWebView
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
  • 1
    *@Andy Jazz* thank you for the help. The actual problem that I want address is to gain full control over apple vision pros display and render 2d graph plot. Below is the question link [https://stackoverflow.com/questions/76715899/how-to-gain-full-control-over-apple-vision-pros-display-and-render-2d-graph-plo] – ZaEeM ZaFaR Jul 19 '23 at 04:43