<s>
Core	B-Library
OpenGL	I-Library
,	O
or	O
CGL	O
,	O
is	O
Apple	O
Inc.	O
'	O
s	O
Macintosh	O
Quartz	O
windowing	B-Application
system	I-Application
interface	O
to	O
the	O
OS	B-Operating_System
X	I-Operating_System
implementation	O
of	O
the	O
OpenGL	B-Application
specification	O
.	O
</s>
<s>
CGL	O
is	O
analogous	O
to	O
GLX	B-Device
,	O
which	O
is	O
the	O
X11	B-Operating_System
interface	O
to	O
OpenGL	B-Application
,	O
as	O
well	O
as	O
WGL	B-Library
,	O
which	O
is	O
the	O
Microsoft	B-Application
Windows	I-Application
interface	O
to	O
OpenGL	B-Application
.	O
</s>
<s>
All	O
windowing	B-Application
system	I-Application
interfaces	O
to	O
OpenGL	B-Application
arose	O
out	O
of	O
the	O
migration	O
of	O
Silicon	O
Graphics	O
proprietary	O
3D	O
graphics	O
application	O
programming	O
interface	O
(	O
API	B-General_Concept
)	O
IrisGL	B-Library
to	O
its	O
current	O
open	O
standard	O
form	O
OpenGL	B-Application
.	O
</s>
<s>
When	O
the	O
decision	O
was	O
made	O
to	O
make	O
IrisGL	B-Library
an	O
open	O
standard	O
,	O
the	O
primary	O
required	O
design	O
change	O
was	O
to	O
make	O
this	O
graphics	O
standard	O
API	B-General_Concept
windowing	B-Application
system	I-Application
agnostic	O
.	O
</s>
<s>
All	O
window	B-Application
system	I-Application
specific	O
logic	O
was	O
therefore	O
removed	O
from	O
IrisGL	B-Library
when	O
moving	O
to	O
OpenGL	B-Application
.	O
</s>
<s>
Window	B-Application
system	I-Application
logic	O
includes	O
any	O
event	O
mechanism	O
for	O
gathering	O
input	O
from	O
devices	O
such	O
as	O
keyboards	O
and	O
mice	O
,	O
as	O
well	O
as	O
any	O
window	O
ordering	O
or	O
sizing	O
logic	O
used	O
when	O
drawing	O
to	O
a	O
modern	O
windowed	O
user	O
interface	O
.	O
</s>
<s>
Further	O
,	O
all	O
internal	O
management	O
of	O
window	O
memory	O
buffers	O
,	O
sometimes	O
referred	O
to	O
as	O
surfaces	O
,	O
was	O
also	O
removed	O
from	O
IrisGL	B-Library
to	O
create	O
OpenGL	B-Application
.	O
</s>
<s>
With	O
OpenGL	B-Application
windowing	B-Application
system	I-Application
agnostic	O
,	O
companies	O
such	O
as	O
Apple	O
must	O
shoulder	O
the	O
burden	O
of	O
configuring	O
and	O
managing	O
the	O
surfaces	O
used	O
as	O
a	O
destination	O
for	O
OpenGL	B-Application
rendering	O
.	O
</s>
<s>
On	O
OS	B-Operating_System
X	I-Operating_System
,	O
CGL	O
is	O
the	O
foundation	O
layer	O
of	O
windowing	B-Application
system	I-Application
interfaces	O
to	O
OpenGL	B-Application
.	O
</s>
<s>
Both	O
AGL	O
(	O
Apple	O
Graphics	O
Library	O
)	O
and	O
the	O
Cocoa	B-Operating_System
(	O
API	B-General_Concept
)	O
(	O
or	O
AppKit	O
)	O
have	O
interfaces	O
to	O
OpenGL	B-Application
and	O
are	O
logical	O
software	O
layers	O
and	O
depend	O
on	O
CGL	O
for	O
their	O
behavior	O
.	O
</s>
<s>
CGL	O
and	O
Cocoa	B-Operating_System
may	O
be	O
used	O
together	O
,	O
however	O
Cocoa	B-Operating_System
classes	O
may	O
implicitly	O
make	O
changes	O
to	O
CGL	O
state	O
.	O
</s>
<s>
Function	O
calls	O
from	O
AGL	O
and	O
Cocoa	B-Operating_System
should	O
not	O
be	O
mixed	O
.	O
</s>
<s>
Configuration	O
of	O
these	O
surfaces	O
is	O
done	O
through	O
a	O
pixel	O
format	O
selection	O
process	O
where	O
different	O
compatible	O
layers	O
of	O
rendering	O
information	O
are	O
combined	O
to	O
form	O
a	O
framebuffer	B-Algorithm
.	O
</s>
<s>
Examples	O
of	O
such	O
layers	O
are	O
color	O
buffers	O
,	O
transparency	B-Algorithm
buffers	I-Algorithm
(	O
alpha	O
)	O
,	O
stencil	O
buffers	O
,	O
and	O
depth	O
buffers	O
.	O
</s>
<s>
Renderers	O
may	O
be	O
either	O
hardware	O
based	O
,	O
such	O
that	O
they	O
correspond	O
to	O
graphics	O
cards	O
installed	O
in	O
the	O
system	O
or	O
they	O
may	O
be	O
software	O
based	O
,	O
where	O
the	O
main	O
CPU	B-General_Concept
of	O
the	O
system	O
handles	O
all	O
of	O
the	O
graphics	O
command	O
processing	O
and	O
final	O
rasterization	O
work	O
.	O
</s>
<s>
On	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
,	O
CGL	O
is	O
also	O
responsible	O
for	O
handling	O
the	O
heterogeneous	O
nature	O
of	O
graphics	O
device	O
installations	O
and	O
configuration	O
on	O
Macintosh	O
systems	O
.	O
</s>
<s>
When	O
users	O
configure	O
their	O
Macintosh	O
to	O
use	O
a	O
virtualized	O
desktop	O
,	O
and	O
they	O
drag	O
windows	O
from	O
one	O
display	O
to	O
another	O
,	O
CGL	O
handles	O
the	O
management	O
of	O
OpenGL	B-Application
graphics	O
state	O
that	O
must	O
be	O
shadowed	O
between	O
devices	O
to	O
provide	O
command	O
processing	O
consistency	O
between	O
them	O
.	O
</s>
<s>
The	O
primary	O
data	O
structure	O
that	O
maintains	O
OpenGL	B-Application
state	O
on	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
is	O
a	O
.	O
</s>
<s>
Also	O
included	O
is	O
Apple	O
's	O
in-house	O
OpenGL	B-Application
software	O
renderer	O
.	O
</s>
<s>
The	O
software	O
renderer	O
,	O
though	O
slow	O
,	O
is	O
fast	O
enough	O
for	O
basic	O
applications	O
and	O
with	O
OS	B-Operating_System
X	I-Operating_System
's	O
OpenGL	B-Application
implementation	O
for	O
development	O
purposes	O
.	O
</s>
