View Full Version : CGL or AGL
ia3n_g
2006.07.20, 12:02 AM
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.
OneSadCookie
2006.07.20, 12:25 AM
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.
Frank C.
2006.07.20, 01:25 AM
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.
OneSadCookie
2006.07.20, 04:39 AM
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 :)
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.