The status of AGL

Hi all,

I’m a fairly experienced OpenGL programmer on Win32 and Linux, but I’m pretty new to writing OpenGL apps for OS X.

I’m curious about the status of AGL. When I read the AGL documentation on Apple’s web site (e.g. About OpenGL for OS X), all of the AGL functions are marked “unsupported”.

Suppose I want to write a Carbon application, and I want to write a windowed OpenGL application. It looks like AGL might be my only option. The CGL documentation indicates that I can use it for full screen or off screen, but I don’t see any mention of windowed mode. For example, I don’t see a way of binding a WindowRef to a CGL context.

Here are the specific questions -

1.) Am I missing something in the CGL documentation ?

2.) Is AGL really unsupported or is it just Apple’s way of telling us that we should really be using Cocoa ?


  1. You should use AGL or NSGL to connect contexts to Carbon or Cocoa windows, respectively. CGL for fullscreen.

  2. No, this is Apple’s stupid documentation. AGL is fully supported and is not going away. “Unsupported” there only means that that function is not included in Carbon itself. You have to link against AGL in addition to Carbon. Real clear, I know… see for official response from Apple about this.

There are also plenty of code samples at showing AGL setup.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.