Post

Replies

Boosts

Views

Activity

Reply to How do I allow my iOS app to run in fullscreen on M1 Macs?
That link is not sufficient. It doesn't deal with resizing the view. I can disable UIRequiresFullscreen to turn the app into a multitasking app. Then I get the window resizing running on macOS M2. The app just draws at the same res, and the grid does resize to the window boundary. It's just downsampling the grid, and it looks terrible. We need a sample showing how to handle resizing to actual window boundaries, so an iOSApponMacOS operates like a real macOS app. There are still bugs with HDR support always reporting 1.0, but it's simpler than dealing with Catalyst.
Aug ’23
Reply to iOS app on MacOS M1 - Window Resize or Full Screen
None of the threads mentioned above help. We just need sample code that shows an iOS on macOS app resizing. There is none. Even the sample showing the UISupportsTrueScreenSizeOnMac and UILaunchToFullScreenByDefaultOnMac keys is set to UIRequiresFullscreen. Turning that off and making sure the orients are all specified allows the window to resize, but the MTKView in a game needs to respond to that. UIWindowScene requires iOS 13, isFullscreen flag requires iOS 16, isiOSAppOnMac requires iOS 14. So this is a minefield of trying to get everything right. This needs a sample app, and not references to pages that don't have details. Having an iOS app switch from fullscreen to windowed and maintain the same resolution regardless of the window size is not a good experience. The UI becomes distorted and the size too small. Dragging from landscape monitor to portrait monitors results in letterboxing instead of filling the display. This needs to be the default behavior for iOS on macOS apps.
Aug ’23
Reply to OpenGL on future iPhones and Macs?
Android has phased out ES for Vulkan. Nintendo uses Vulkan or lower-level APIs. Windows only has GL 1.1 support, unless you use IHV installs. Linux is emulating DX and Vulkan with Proton. Metal and DX11 are similar in complexity and power, with Metal being a very straightforward way to use tile-based gpus. OpenGL is dead even if there are stragglers. Let me know when there's a GL 4.7 or an ES 3.3 if you think what I'm saying is nonsense. OpenGL global state and having to pepper code with glGetError() in WebGL/GL is tedious. There have been many OpenGL implementation on consoles, and no one uses them due to the hidden state.
Aug ’23
Reply to How to detect ProMotion VRR on iOS
The fullscreen requirement for iOS on macOS is if an app doesn't support all orientations and multitasking. It's a little weird to have the windowed and fullscreen render the same dimensions, since it means text is unreadable in our app when windowed, and there is downscaling of the pixels. So I'll see if we can disable that so that we get a resizable window. But all the remaining issues above still need solutions.
Jun ’23
Reply to How to detect ProMotion VRR on iOS
For lack of anything better, I'll assume detecting ProMotion on iOS is UIScreen.maximumRefreshRate > 80. But I'd like to know I have ProMotion even when it's throttled to 60Hz. Also seems that there is no detect for the "fullscreen" hack of running iOS app on macOS. The app starts up at the full res of the display, and stays that resolution even when you drop out of fullscreen mode (fn+F). The windowed mode can't really be resized, so this must be the tradeoff for this mode, and it beats adopting MacCatalyst. So we're rendering a lot more pixels than needed in windowed mode, and can't tell fullscreen vs. not by comparing the UIScreen rect and UIView size. Maybe I can test the UIWindow size instead, since that seems smaller than the view res in this case. I'll probably have to submit this as a precious ticket to get any response to these issues.
Jun ’23
Reply to How to detect ProMotion VRR on iOS
Also have an iOS app using running atop a Macbook Pro M2 with ProMotion. So here again, I assume I need to detect fullscreen setting and whether ProMotion is present but from the iOS side. But IOS doesn't seem to have these APIs and there's nothing in the docs or WWDC talk about detection. Also frustrating that sysctl(HW, HW_MODEL) works on macOS running iOS (but not for iOS), but sysctl(HW, HW_MACHINE) returns the wrong value. HW_MACHINE returns that the M2 is an iPad8,6. Apple really needs to release sample code to better support this, and any sample for ProMotion on both platforms included detection code.
Jun ’23
Reply to How to schedule CAMetalLayer rendering for lowest CPU to Display latency?
I'd like to know where the Metal sample app is that they mention in the WWDC 21 presentation. But check that out since it has a lot of simple things to get all this working. Also trying to search for "ProMotion" and getting tons of hits for "promotion" stinks. Can we just call this VRR like everyone else instead? Also CVDisplayLink has been forced to 60Hz when running under Rosetta 2 since Monterrey due to an Apple bug. https://developer.apple.com/videos/play/wwdc2021/10147/
Jun ’23
Reply to Sudden error being logged continuously in XCode console
This error in CVDisplayLink has been occurring since the release of Moneterrey beta over 1.5 years ago. The messages only occur when running x64 apps under Rosetta 2. And the early logs show that the display link is forced to 60Hz, which basically kills ProMotion adaptive sync on M1/M2 at 120Hz. Then it streams a ton of repeated NSLog messages at 60Hz to the console which further slow down our app. The suggestions to set OS_ACTIVITY_MODE disabled to suppress with the repeated logs works, but then also suppresses all NSLog from ours and any Apple libraries. I don't understand how this hasn't been fixed, since I'm now on macOS 13.3.1, and was on macOS 12.0 when this started happening.
Jun ’23
Reply to Vulkan and Metal (some observations)
OpenGL is dead, and Vulkan is overly complex to use. MoltenVK is good enough, and with VK_EXT_shader_object support, it should be able to make Vulkan emulate Metal/DX11. Vulkan is moving back to shaders and dynamic state from the locked-down PSOs that it started with. Even AMD's consoles aren't that locked down in their graphics APIs. Metal and metal-cpp aren't that hard to grasp, and tie direclty in with the hardware used on the desktop and mobile side.
May ’23