Post

Replies

Boosts

Views

Activity

Reply to PNG Compression - ImageIO
You're supposed to just run each algorithm per row, and then take the smallest one. There's little point in using one algorithm for the entire image. PNG lets you store the lossless algorithm type as the first byte of each row. I've always used my own png code instead of Apple's.
Topic: Media Technologies SubTopic: General Tags:
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Also finding that our ancient syslog calls are just going out to the console even without an openlog call. And there's no API to test if syslog is open or not. So I'll remove that code too, and just go to printf. But I'd like to use os_log solely for the file/line jump. But I need to be able to call __builtin_return_address() and hand that (and the dso_handle?) or file/line/function to the logging system. Being unable to send all logs to a central point in my game code, and do filtering, and locking a mutex, and breaking up multiple os_logs, and supplementing additional data that each macro doesn't is important. I can't do this in Swift, ObjC, or C++. There is no viable log call using NSLog, syslog, and os_log_impl since these all appear to call __builtin_return_address(0) internally. So that forces these Apple specific calls to be injected into all sorts of code that doesn't need that to get the correct file/line.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Not exactly. I thought you might know of a new api to talk to the Xcode console. I’m just trying to pass a dso handle from existing log macros to a central existing C++ logger and get the console to print file/line. Seems simple enough if these calls don’t take file/line/func explicitly. Apparently these calls use the return address to find the caller, and don’t allow that to be passed down. That’s why the calls have to be injected at the call site. I’m not sure what the dso_handle is for, but must be to quick filter out libraries that Apple wants to hide logs from. It’s just a mach_header which is only .o file and not line specific. This log system was always built for Apple to use internally, but pretty much impractical to use by anyone else. But it’s all I have access to. But I’ll file something.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Hey Quinn, That’s not the way apps/reality works. Okay now my log is 4K characters, and os_log truncates at 1k. Or I need to route errors/warnings to a FILE*. Or I need to filter out specific messages. Or I use fmod or any number of commercial game libraries, and they just supply a callback hook with level/file/line/func/message. Or I need to print thread name and suppress the os_log output to console that only has TID:PID both of which are not human friendly. We can’t just inject os log macros throughout all this code. Every system already has its own logging system and os_log thwarts routing logs. os_log even reports the call location and timestamp which isn’t passed down. See android_log_message for a way easier and more flexible log call. A single code point under a mutex can hand it level, group, file, line, message. We’ll just stick with printf, but is there someway we can feed the console all the log fields we have without going through the severely limited os_log?
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’23
Reply to Metal API supported files for models?
You might be able convert gltf to usd using some Apple content tools AFAIK. ModelIO is what you want to use for loading or creating models. But ModelIO removed fbx support, so now you have to use tools to convert fbx to usd which is quite lossy (f.e. losing all textures, etc). Or there are open-source fbx processors.
Topic: Graphics & Games SubTopic: General Tags:
Sep ’23
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
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.
Topic: Graphics & Games SubTopic: General Tags:
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.
Topic: Graphics & Games SubTopic: General Tags:
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.
Topic: Graphics & Games SubTopic: General Tags:
Jun ’23
Reply to PNG Compression - ImageIO
You're supposed to just run each algorithm per row, and then take the smallest one. There's little point in using one algorithm for the entire image. PNG lets you store the lossless algorithm type as the first byte of each row. I've always used my own png code instead of Apple's.
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
https://feedbackassistant.apple.com/feedback/13203125
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Also finding that our ancient syslog calls are just going out to the console even without an openlog call. And there's no API to test if syslog is open or not. So I'll remove that code too, and just go to printf. But I'd like to use os_log solely for the file/line jump. But I need to be able to call __builtin_return_address() and hand that (and the dso_handle?) or file/line/function to the logging system. Being unable to send all logs to a central point in my game code, and do filtering, and locking a mutex, and breaking up multiple os_logs, and supplementing additional data that each macro doesn't is important. I can't do this in Swift, ObjC, or C++. There is no viable log call using NSLog, syslog, and os_log_impl since these all appear to call __builtin_return_address(0) internally. So that forces these Apple specific calls to be injected into all sorts of code that doesn't need that to get the correct file/line.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Not exactly. I thought you might know of a new api to talk to the Xcode console. I’m just trying to pass a dso handle from existing log macros to a central existing C++ logger and get the console to print file/line. Seems simple enough if these calls don’t take file/line/func explicitly. Apparently these calls use the return address to find the caller, and don’t allow that to be passed down. That’s why the calls have to be injected at the call site. I’m not sure what the dso_handle is for, but must be to quick filter out libraries that Apple wants to hide logs from. It’s just a mach_header which is only .o file and not line specific. This log system was always built for Apple to use internally, but pretty much impractical to use by anyone else. But it’s all I have access to. But I’ll file something.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Hey Quinn, That’s not the way apps/reality works. Okay now my log is 4K characters, and os_log truncates at 1k. Or I need to route errors/warnings to a FILE*. Or I need to filter out specific messages. Or I use fmod or any number of commercial game libraries, and they just supply a callback hook with level/file/line/func/message. Or I need to print thread name and suppress the os_log output to console that only has TID:PID both of which are not human friendly. We can’t just inject os log macros throughout all this code. Every system already has its own logging system and os_log thwarts routing logs. os_log even reports the call location and timestamp which isn’t passed down. See android_log_message for a way easier and more flexible log call. A single code point under a mutex can hand it level, group, file, line, message. We’ll just stick with printf, but is there someway we can feed the console all the log fields we have without going through the severely limited os_log?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to os_log doesn't log file/line to Xcode 15 console for C++ code
Just to clarify the os_log_with_type works from a .cpp, .m, or. mm file. But if you try to pass a dso handle from a .m, .mm, or .cpp file that is not Logger.cpp or Logger.mm calling my_os_log_with_type, then that &__dso_handle has some sort of protection that doesn't generate any file/line in the new Console.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to Metal API supported files for models?
You might be able convert gltf to usd using some Apple content tools AFAIK. ModelIO is what you want to use for loading or creating models. But ModelIO removed fbx support, so now you have to use tools to convert fbx to usd which is quite lossy (f.e. losing all textures, etc). Or there are open-source fbx processors.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to `MTKView` on visionOS
MTKView uses CA/NSDisplayLink, but visionOS is driving the compositor. There's little point too, since you need the drawables from vision (side-by-side or layered).
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Reply to FPS Drop in PUBG - 14 Pro Max While Guided Access or Screen Recording is on.
Are you recording to a valid format that is hardware supported (HVEC or ProRes)? I also couldn't find anyway on macOS screen recording to record HDR content.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’23
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.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
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.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
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.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to MTKView fullscreen stutter
You have to do your own frame pacing on the present call. See the WWDC 21 presentation all about this. Also the display link fps settings, currentRenderPassDescriptor/currentDrawable calls are all stalls too.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’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.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to HDR seems broken for iOS on macOS using M2 MBP.
My iPad Air 3 reports 2x for UIScreen.potentialEDRHeadroom. So then I activate HDR mode. I'd like to do the same for the app running atop an M2.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’23