CGL or AGL

Member
Posts: 49
Joined: 2006.07
Post: #1
What are the pros and cons of AGL and CGL? I am working on a Carbon app that runs in a window, but I would like to add the option to switch to full screen mode. It seems like using AGL would be more convenient because I can still use the aglSwapBuffers command regardless of which mode the game is in, but if there are advantages to using CGL I don't want to overlook them.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
AGL is a thin layer on CGL.

The only advantage I can think of to CGL is that CGLSetFullScreen() uses the current display mode, where aglSetFullScreen picks one for you.
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #3
I was under the impression that using aglSetFullScreen with nulls across the board was basically equivalent to CGLSetFullScreen (going by Apple's example code, not their docs). The extra parameters being OS 9 legacies that are best ignored on OS X, with the device number always ignored regardless.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
So was I. Unfortunately, there's at least one revision of Mac OS X 10.4 where that broke, though I believe it now works again. I wish they'd document it as such Smile
Quote this message in a reply
Post Reply