Skip to content

Commit

Permalink
Revert "iOS : set depth texture format in RenderSession internal."
Browse files Browse the repository at this point in the history
This reverts commit 74fee9c.
  • Loading branch information
vinsentli committed Dec 10, 2024
1 parent df01ffb commit 4188a2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions shell/ios/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ - (BOOL)application:(UIApplication*)application
.majorVersion = 3,
.minorVersion = 0},
.swapchainColorTextureFormat = igl::TextureFormat::BGRA_SRGB,
.depthTextureFormat = igl::TextureFormat::S8_UInt_Z32_UNorm,
},
#endif
#if IGL_BACKEND_OPENGL
Expand All @@ -52,6 +53,7 @@ - (BOOL)application:(UIApplication*)application
.majorVersion = 3,
.minorVersion = 0},
.swapchainColorTextureFormat = igl::TextureFormat::BGRA_SRGB,
.depthTextureFormat = igl::TextureFormat::S8_UInt_Z24_UNorm,
},
#endif
{
Expand All @@ -60,6 +62,7 @@ - (BOOL)application:(UIApplication*)application
.majorVersion = 2,
.minorVersion = 0},
.swapchainColorTextureFormat = igl::TextureFormat::BGRA_SRGB,
.depthTextureFormat = igl::TextureFormat::S8_UInt_Z24_UNorm,
},
#endif
// @fb-only
Expand Down
2 changes: 1 addition & 1 deletion shell/ios/ViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ - (void)initRenderSessionController {
IGL_DEBUG_ASSERT(platformDevice);
return igl::SurfaceTextures{
.color = platformDevice->createTextureFromNativeDrawable((CAEAGLLayer*)layer_, nullptr),
.depth = platformDevice->createTextureFromNativeDepth((CAEAGLLayer*)layer_, igl::TextureFormat::Z_UNorm16, nullptr),
.depth = platformDevice->createTextureFromNativeDepth((CAEAGLLayer*)layer_, config_.depthTextureFormat, nullptr),
};
}
#endif
Expand Down

0 comments on commit 4188a2c

Please sign in to comment.