Carbon APIs were still functional for an OpenGL context through macOS 15, but as of macOS 26, have been removed entirely. If you aren't on macOS 26 yet, this is a fun experiment to play with and learn from:
https://handmade.network/forums/wip/t/2408-very_minimal_osx_platform_layer_experiments
https://developer.apple.com/documentation/macos-release-notes/macos-26-release-notes#AGL