0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

failed assertion `For depth attachment, the render pipeline's pixelFormat (MTLPixelFormatInvalid) does not match the framebuffer's pixelFormat (MTLPixelFormatDepth32Float). の解決方法

Last updated at Posted at 2019-08-29

failed assertion `For depth attachment, the render pipeline's pixelFormat (MTLPixelFormatInvalid) does not match the framebuffer's pixelFormat (MTLPixelFormatDepth32Float).

このエラーは、MetalViewをStoryboardで@IBOutlet接続を行うときに、Object Library から新たにMetalViewを作成していると発生してしまうようです。

以下、Apple Develper Forumsよりの引用です。(翻訳済み)

デフォルトでは、オブジェクトライブラリのMetalKitビューはMTKView.depthStencilPixelformatをMTLPixelFormatDepth32Floatに設定します。

なので、superViewであるViewのクラスをMTKViewに設定します。
その後、@IBOutlet接続をsuperViewに対して行うとこのエラーは解消できました。参考までに。

スクリーンショット 2019-08-30 7.47.11.png
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?