As mentioned, Carbon is no longer supported in 64-bit mode. You need to create a Cocoa app. The easiest way to do what you want is to create an NSWindow
containing an NSOpenGLView
.
Also, AGL is deprecated. The context you get from an NSOpenGLView
will be a CGLContext
.
It sounds like you're trying to make some old code work. You should also read up on OpenGL 3.3 and later. If you're using OpenGL code that worked with Carbon, it's likely OpenGL 1.2 and using lots of deprecated functionality.