What exactly is a Graphic Context?

Viewed 3447

What exactly is encapsulated by a Graphic Context (or Device Context in Windows)?

The various definitions across the net agree that a context encapsulates the parameters for the various graphics operations. See: X11, Mac OS, Windows

What is not clear is whether a context also encapsulates the memory buffer upon which the graphics operations are performed.

In the X11 entry there is a mention about separate Drawable objects, Window and Pixmap, which represent the drawing surfaces. Going a bit further, into the OpenGL GLX documentation, there is a clear separation between Rendering Contexts and Drawing Surfaces. Interestingly it is also said that "applications can render into the same surface, using different contexts" and that "it is also possible to use a single context to render into multiple surfaces".

3 Answers
Related