Once a suitable visual and colormap are found, the program can create an OpenGL rendering context using glXCreateContext. (The same context can be used for different windows with the same visual.)
The last parameter allows the program to request a direct rendering context if the program is connected to a local X server. An OpenGL implementation is not required to support direct rendering, but if it does, faster rendering is possible since OpenGL will render directly to the graphics hardware. Direct rendered OpenGL requests do not have to be sent to the X server. Even when on the local machine, you may not want direct rendering in some cases. For example, if you want to render to X pixmaps, you must render through the X server.
GLX rendering contexts support sharing of display lists among one another. To this end, the third parameter to glXCreateContext is another already created GLX rendering context. NULL can be specified to create an initial rendering context. If an already existent rendering context is specified, the display list indexes and definitions are shared by the two rendering contexts. The sharing is transitive so a share group can be formed between a whole set of rendering contexts.
To share, all the rendering contexts must exist in the same address space. This means direct renderers cannot share display lists with renderers rendering through the X server. Likewise direct renderers in separate programs cannot share display lists. Sharing display lists between renderers can help to minimize the memory requirements of applications that need the same display lists.