Written by Philip Brown

This should be part of a more general coding notes doc. But as it is,
this is a file that explains(?) how GLX uses X11 Visuals
(Or at least how I think it uses them)

A "Visual" is a way of telling the server what kind of graphics color
and support you'd like. For example, "24bit, doublebuffered, TrueColor"
might be "visual id #4", whereas "24bit, singlebuffered, TrueColor"
might be "visual id #10"

The available visual IDs dont always start at 0 or 1.

The X server pre-defines a certain number of visuals, for use with graphics
programs. Lets say they have 'visual ids' 33, and 34.

GLX goes through, sees that the X server has defined visual IDs up to 34,
and the defines its own pseudo-visual-ids above that. The reason for this is
to encode extra options in a single go. See docs for glXChooseVisual
for more details on why that is important.

BROKEN RIGHT NOW:
  GlxInitVisuals is not creating visuals with the correct VID

INTERNAL VISUAL CREATION FLOW:

So far, what I believe happens is:

  GlxInitVisuals() calls either a generic routine [XSMesaInitVisuals]
    or a hardware specific routine, to generate a linked-list
    of candidate visuals.
    Note that if there is 1 physical visual, it generates
      16 different visuals, with variants on stencil_size, blah, blah
  GLFinalizeVisuals picks and chooses from the linked-list, in
    a really BIZZARE fashion.
    It populates the glscreen->visuals[] array. However,
    it only populates a number of visuals equal to
      screenInfo[screen]->numVisuals
    
    
