Portal:OpenGL Concepts/State
The OpenGL context contains information used by the rendering system. This information is called State, which has given rise to the saying that OpenGL is a "state machine". State, in terms of the basic effect, is really just some value in the OpenGL context. When a context is created, every piece of OpenGL state is initialized to a well-defined default value. Note that this does not mean that a freshly created context can be used to render with without some setup work.
OpenGL functions can be grouped into 3 broad categories: functions that set state into the context, functions that query state, and functions that render, given the current state of the context.
Every piece of OpenGL state has some unique identifier, which can be used to later query that piece of state. The OpenGL specification has a massive table at the end, defining what these identifiers are and which state they can be used to query. Not all of the identifiers are as simple as an enumeration, as OpenGL state can be in lists, where each entry must be queried individually.