As you probably already know, the OpenGL graphics API operates using a state machine that tracks the current settings and attributes that the OpenGL code has set. Each window that we are drawing in using OpenGL has a state machine associated with it. The state machines associated with these windows are referred to as OpenGL rendering contexts. Each context stores the current state of on instance of an OpenGL renderer. Why do you need it As outlined in previous sections, VR Juggler uses a single memory area for all application data.
All threads can see the same memory area and thus share the same copy of all variables.
This makes programming normal application code very easy because you never have to worry about which thread can see which variables. But in the case of context specific data, it presents a problem. To understand the problem, consider an environment where we are using a single display list. That display list is created to draw some object in the scene. The following class shows an outline of the idea we are talking about.