Hi, I'm Beginner with Metal 4 and Model I/O 🥺.
I can render simple models with just one mesh, but when I try to render models with SubMeshes, nothing shows up on screen.
Can anyone help me figure out how to properly render models with multiple submeshes? I think I'm not iterating through them correctly or maybe missing some buffers setup.
Here's what I have so far:
https://www.icloud.com.cn/iclouddrive/0a6x_NLwlWy-herPocExZ8g3Q#LoadModel
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Description
I've encountered an issue with NavigationSplitView on visionOS when using a refreshable ScrollView or List in the detail view.
The Problem:
When implementing pull-to-refresh in the detail view of a NavigationSplitView, the ProgressView disappears and generates this warning:
Trying to convert coordinates between views that are in different UIWindows, which isn't supported. Use convertPoint:fromCoordinateSpace: instead.
I discovered that if the detail view includes a .navigationTitle(), the ProgressView remains visible and works correctly!
Below is a minimal reproducible example showing this behavior. When you run this code, you'll notice:
The sidebar refreshable works fine
The detail refreshable works only when .navigationTitle("Something") is present
Remove the navigationTitle and the detail view's refresh indicator disappears
minimal Demo
import SwiftUI
struct MinimalRefreshableDemo: View {
@State private var items = ["Item 1", "Item 2", "Item 3"]
@State private var detailItems = ["Detail 1", "Detail 2", "Detail 3"]
@State private var selectedItem: String? = "Item 1"
var body: some View {
NavigationSplitView {
List(items, id: \.self, selection: $selectedItem) { item in
Text(item)
}
.refreshable {
items = ["Item 1", "Item 2", "Item 3"]
}
.navigationTitle("Chat")
} detail: {
List {
ForEach(detailItems, id: \.self) { item in
Text(item)
.frame(height: 100)
.frame(maxWidth: .infinity)
}
}
.refreshable {
detailItems = ["Detail 1", "Detail 2", "Detail 3"]
}
.navigationTitle("Something")
}
}
}
#Preview {
MinimalRefreshableDemo()
}
Is this expected behavior? Has anyone else encountered this issue or found a solution that doesn't require adding a navigation title?