home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / extensions / spec / multisample.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  25.1 KB  |  522 lines

  1. Name
  2.  
  3.     SGIS_multisample
  4.  
  5. Name Strings
  6.  
  7.     GL_SGIS_multisample
  8.     GLX_SGIS_multisample
  9.  
  10. Version
  11.  
  12.     $Date: 1995/09/30 02:31:53 $ $Revision: 1.1 $
  13.  
  14. Number
  15.  
  16.     25
  17.  
  18. Dependencies
  19.  
  20.     SGIX_pixel_texture affects the definition of this extension.
  21.  
  22. Overview
  23.  
  24.     This extension provides a mechanism to antialias all GL primitives:
  25.     points, lines, polygons, bitmaps, and images.  The technique is to
  26.     sample all primitives multiple times at each pixel.  The color sample
  27.     values are resolved to a single, displayable color each time a pixel
  28.     is updated, so the antialiasing appears to be automatic at the
  29.     application level.  Because each sample includes depth and stencil
  30.     information, the depth and stencil functions perform equivalently
  31.     to the single-sample mode.
  32.  
  33.     An additional buffer, called the multisample buffer, is added to
  34.     the framebuffer.  Pixel sample values, including color, depth, and
  35.     stencil values, are stored in this buffer.  When the framebuffer
  36.     includes a multisample buffer, it does not also include separate
  37.     depth or stencil buffers, even if the multisample buffer does not
  38.     store depth or stencil values.  Color buffers (left/right, front/
  39.     back, and aux) do coexist with the multisample buffer, however.
  40.  
  41.     Multisample antialiasing is most valuable for rendering polygons,
  42.     because it requires no sorting for hidden surface elimination, and
  43.     it correctly handles adjacent polygons, object silhouettes, and
  44.     even intersecting polygons.  If only points or lines are being
  45.     rendered, the "smooth" antialiasing mechanism provided by the base
  46.     GL may result in a higher quality image.  This extension is designed
  47.     to allow multisample and smooth antialiasing techniques to be
  48.     alternated during the rendering of a single scene.
  49.  
  50. Issues
  51.  
  52.     *    Should SamplePatternSGIS be eliminated?  Does anyone use this feature?
  53.  
  54.     *    Should GLX_SAMPLE_BUFFERS_SGIS and SAMPLE_BUFFERS_SGIS be eliminated?
  55.     Given the current specification, applications that query only
  56.     GLX_SAMPLES_SGIS will be written, taking zero to mean that there is
  57.     no multisample buffer.
  58.  
  59. New Procedures and Functions
  60.  
  61.     void SampleMaskSGIS(clampf value,
  62.                 boolean invert);
  63.  
  64.     void SamplePatternSGIS(enum pattern);
  65.  
  66. New Tokens
  67.  
  68.     Accepted by the <attribList> parameter of glXChooseVisual, and by the
  69.     <attrib> parameter of glXGetConfig:
  70.  
  71.     GLX_SAMPLE_BUFFERS_SGIS
  72.     GLX_SAMPLES_SGIS
  73.  
  74.     Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and
  75.     by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
  76.     GetDoublev:
  77.  
  78.     MULTISAMPLE_SGIS
  79.     SAMPLE_ALPHA_TO_MASK_SGIS
  80.     SAMPLE_ALPHA_TO_ONE_SGIS
  81.     SAMPLE_MASK_SGIS
  82.  
  83.     Accepted by the <mask> parameter of PushAttrib:
  84.  
  85.     MULTISAMPLE_BIT_EXT (bit 29)
  86.  
  87.     Accepted by the <pattern> parameter of SamplePatternSGIS:
  88.  
  89.     1PASS_SGIS
  90.     2PASS_0_SGIS
  91.     2PASS_1_SGIS
  92.     4PASS_0_SGIS
  93.     4PASS_1_SGIS
  94.     4PASS_2_SGIS
  95.     4PASS_3_SGIS
  96.  
  97.     Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
  98.     GetIntegerv, and GetFloatv:
  99.  
  100.     SAMPLE_BUFFERS_SGIS
  101.     SAMPLES_SGIS
  102.     SAMPLE_MASK_VALUE_SGIS
  103.     SAMPLE_MASK_INVERT_SGIS
  104.     SAMPLE_PATTERN_SGIS
  105.  
  106. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  107.  
  108.     None
  109.  
  110. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  111.  
  112.     If SAMPLE_BUFFERS_SGIS is one, the rasterization of all GL primitives
  113.     is changed, and is referred to as multisample rasterization.  Otherwise
  114.     primitive rasterization operates as it is described in the GL
  115.     specification, and is referred to as single-sample rasterization.  The
  116.     value of SAMPLE_BUFFERS_SGIS is an implementation dependent constant, and
  117.     is queried by calling GetIntegerv with <pname> set to SAMPLE_BUFFERS_SGIS.
  118.  
  119.     During multisample rendering the contents of a pixel fragment are
  120.     changed in two ways.  First, each fragment includes a coverage mask
  121.     with SAMPLES_SGIS bits.  The value of SAMPLES_SGIS is an implementation
  122.     dependent constant, and is queried by calling GetIntegerv with <pname>
  123.     set to SAMPLES_SGIS.  Second, each fragment includes SAMPLES_SGIS depth
  124.     values, instead of the single depth value that is maintained in
  125.     single-sample rendering mode.  Each pixel fragment thus consists of
  126.     integer x and y grid coordinates, a color, SAMPLES_SGIS depth values,
  127.     texture coordinates, a coverage value, and the SAMPLES_SGIS-bit mask.
  128.  
  129.     The behavior of multisample rasterization is a function of
  130.     MULTISAMPLE_SGIS, which is enabled and disabled by calling Enable or
  131.     Disable, with <cap> set to MULTISAMPLE_SGIS.  Its value is queried using
  132.     IsEnabled, with <cap> set to MULTISAMPLE_SGIS.
  133.  
  134.     If MULTISAMPLE_SGIS is disabled, multisample rasterization of all
  135.     primitives is equivalent to single-sample rasterization, except that the
  136.     fragment coverage mask is set to all ones.  The depth values may all
  137.     be set to the single value that would have been assigned by single-sample
  138.     rasterization, or they may be assigned as described below for
  139.     MULTISAMPLE_SGIS-enabled multisample rasterization.
  140.  
  141.     If MULTISAMPLE_SGIS is enabled, multisample rasterization of all
  142.     primitives differs substantially from single-sample rasterization.
  143.     It is understood that each pixel in the framebuffer has SAMPLES_SGIS
  144.     locations associated with it.  These locations are exact positions,
  145.     rather than regions or areas, and each is referred to as a sample point.
  146.     The sample points associated with a pixel may be located inside or
  147.     outside of the unit square that is considered to bound the pixel.
  148.     Furthermore, the pattern (relative location) of sample points may
  149.     be identical for each pixel in the framebuffer, or it may differ.
  150.  
  151.     The locations of the sample points are relatively static; they change
  152.     only when SamplePatternSGIS is called, as a repeatable function of
  153.     parameter <pattern>.  The default pattern 1PASS_SGIS is designed to
  154.     produce a well antialiased result in a single rendering pass.  Patterns
  155.     2PASS_0_SGIS and 2PASS_1_SGIS together specify twice the number of
  156.     sample points per pixel.  It is intended that a scene be completely
  157.     rendered using pattern 2PASS_0_SGIS, then completely rendered again
  158.     using 2PASS_1_SGIS.  When these two images are averaged using the
  159.     accumulation buffer, the result is as if a single pass had been
  160.     rendered with a filter of twice SAMPLES_SGIS sample points.  Patterns
  161.     4PASS_0_SGIS, 4PASS_1_SGIS, 4PASS_2_SGIS, and 4PASS_3_SGIS together define
  162.     a pattern of four times SAMPLES_SGIS sample points. They can be used
  163.     to accumulate an image after four complete rendering passes.  It is
  164.     not possible to query the actual sample locations of a pixel.  The
  165.     sample pattern mode is queried by calling GetIntegerv with <pname>
  166.     set to SAMPLE_PATTERN_SGIS.  By default the sample pattern is 1PASS_SGIS.
  167.  
  168.     If the sample patterns differ per pixel, they should be aligned to
  169.     window, not screen, boundaries.  Otherwise rendering results will be
  170.     window-position specific.  The invariance requirement described
  171.     in section 3.1 is relaxed for all enabled multisample rendering,
  172.     because the sample patterns may be a function of pixel location.
  173.  
  174.     3.3.2 Point Multisample Rasterization
  175.  
  176.     If MULTISAMPLE_SGIS is enabled, and SAMPLE_BUFFERS_SGIS is one, then
  177.     points are rasterized using the following algorithm, regardless of
  178.     whether point antialiasing (POINT_SMOOTH) is enabled or disabled.
  179.     Point rasterization produces a fragment for each framebuffer pixel
  180.     with one or more sample points that intersect the region lying within
  181.     the circle having diameter equal to the current point width and
  182.     centered at the point's (Xw,Yw).  The coverage value for each fragment
  183.     is 1.  Mask bits that correspond to sample points that intersect the
  184.     circular region are 1, other mask bits are 0.  All depth values of the
  185.     fragment are assigned the depth value of the point being rasterized.
  186.     The data associated with each fragment are otherwise the data
  187.     associated with the point being rasterized.
  188.  
  189.     Point size range and number of gradations are equivalent to those
  190.     supported for antialiased points.
  191.  
  192.     3.4.4 Line Multisample Rasterization
  193.  
  194.     If MULTISAMPLE_SGIS is enabled, and SAMPLE_BUFFERS_SGIS is one, then
  195.     lines are rasterized using the following algorithm, regardless of
  196.     whether line antialiasing (LINE_SMOOTH) is enabled or disabled.  Line
  197.     rasterization produces a fragment for each framebuffer pixel with one
  198.     or more sample points that intersect the rectangular region that is
  199.     described in the Antialiasing section of 3.4.2 (Other Line Segment
  200.     Features).  If line stippling is enabled, the rectangular region is
  201.     subdivided into adjacent unit-length rectangles, with some rectangles
  202.     eliminated according to the procedure given under Line Stipple, where
  203.     "fragment" is replaced by "rectangle".
  204.  
  205.     The coverage value for each fragment is 1.  Mask bits that correspond
  206.     to sample points that intersect a retained rectangle are 1, other mask
  207.     bits are 0.  Each depth value is produced by substituting the
  208.     corresponding sample location into equation 3.1, then using the
  209.     result to evaluate equation 3.3.  The data associated with each
  210.     fragment are otherwise computed by evaluating equation 3.1 at the
  211.     fragment center, then substituting into equation 3.2.
  212.  
  213.     Line width range and number of gradations are equivalent to those
  214.     supported for antialiased lines.
  215.  
  216.     3.5.6 Polygon Multisample Rasterization
  217.  
  218.     If MULTISAMPLE_SGIS is enabled, and SAMPLE_BUFFERS_SGIS is one, then
  219.     polygons are rasterized using the following algorithm, regardless of
  220.     whether polygon antialiasing (POLYGON_SMOOTH) is enabled or disabled.
  221.     Polygon rasterization produces a fragment for each framebuffer pixel
  222.     with one or more sample points that satisfy the point sampling
  223.     criteria described in section 3.5.1, including the special treatment
  224.     for sample points that lie on a polygon boundary edge.  If a polygon
  225.     is culled, based on its orientation and the CullFace mode, then no
  226.     fragments are produced during rasterization.  Fragments are culled
  227.     by the polygon stipple just as they are for aliased and antialiased
  228.     polygons.
  229.  
  230.     The coverage value for each fragment is 1.  Mask bits that correspond
  231.     to sample points that satisfy the point sampling criteria are 1, other
  232.     mask bits are 0.  Each depth value is produced by substituting the
  233.     corresponding sample location into the barycentric equations described
  234.     in section 3.5.1, using the approximation to equation 3.4 that omits
  235.     w components.  The data associated with each fragment are otherwise
  236.     computed by barycentric evaluation using the fragment's center point.
  237.  
  238.     The rasterization described above applies only to the FILL state of
  239.     PolygonMode.  For POINT and LINE, the rasterizations described in
  240.     3.3.2 (Point Multisample Rasterization) and 3.4.4 (Line Multisample
  241.     Rasterization) apply.
  242.  
  243.     3.6.4 Multisample Rasterization of Pixel Rectangles
  244.  
  245.     If MULTISAMPLE_SGIS is enabled, and SAMPLE_BUFFERS_SGIS is one, then
  246.     pixel rectangles are rasterized using the following algorithm.
  247.     Let (Xrp,Yrp) be the current raster position.  (If the current raster
  248.     position is invalid, then DrawPixels is ignored.)  If a particular
  249.     group (index or components) is the nth in a row and belongs to the
  250.     mth row, consider the region in window coordinates bounded by the
  251.     rectangle with corners
  252.  
  253.     (Xrp + Zx*n, Yrp + Zy*m)
  254.  
  255.     and
  256.  
  257.     (Xrp + Zx*(n+1), Yrp + Zy*(m+1))
  258.  
  259.     where Zx and Zy are the pixel zoom factors specified by PixelZoom,
  260.     and may each be either positive or negative.  A fragment representing
  261.     group n,m is produced for each framebuffer pixel with one or more
  262.     sample points that lie inside, or on the bottom or left boundary, of
  263.     this rectangle.  Each fragment so produced takes its associated data
  264.     from the group and from the current raster position, in a manner
  265.     consistent with SGIX_pixel_texture (if it is implemented) or in a
  266.     manner consistent with the discussion in the Conversion to Fragments
  267.     subsection of section 3.6.3 of the GL specification.  All depth
  268.     sample values are assigned the same value, taken either from the
  269.     group (if it is a depth component group) or from the current raster
  270.     position (if it is not).
  271.  
  272.     A single pixel rectangle will generate multiple, perhaps very many
  273.     fragments for the same framebuffer pixel, depending on the pixel zoom
  274.     factors.
  275.  
  276.     3.7.1 Bitmap Multisample Rasterization
  277.  
  278.     If MULTISAMPLE_SGIS is enabled, and SAMPLE_BUFFERS_SGIS is one, then
  279.     bitmaps are rasterized using the following algorithm.  If the current
  280.     raster position is invalid, the bitmap is ignored.  Otherwise, a
  281.     screen-aligned array of pixel-size rectangles is constructed, with its
  282.     lower-left corner at (Xrp,Yrp), and its upper right corner at
  283.     (Xrp+w,Yrp+h), where w and h are the width and height of the bitmap.
  284.     Rectangles in this array are eliminated if the corresponding bit in the
  285.     bitmap is zero, and are retained otherwise.  Bitmap rasterization
  286.     produces a fragment for each framebuffer pixel with one or more sample
  287.     points either inside or on the bottom or left edge of a retained
  288.     rectangle.
  289.  
  290.     The coverage value for each fragment is 1.  Mask bits that correspond
  291.     to sample points either inside or on the bottom or left edge of a
  292.     retained rectangle are 1, other mask bits are 0.  The associated data
  293.     for each fragment are those associated with the current raster
  294.     position.  Once the fragments have been produced, the current raster
  295.     position is updated exactly as it is in the single-sample rasterization
  296.     case.
  297.  
  298. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  299. and the Frame Buffer)
  300.  
  301.     4.1.2.5 Multisample Fragment Operations
  302.  
  303.     [This section follows section 4.1.2 (Scissor test) and precedes section
  304.      4.1.3 (Alpha test)]
  305.  
  306.     This step modifies fragment alpha and mask values, based on the values
  307.     of SAMPLE_ALPHA_TO_MASK_SGIS, SAMPLE_ALPHA_TO_ONE_SGIS, SAMPLE_MASK_SGIS,
  308.     SAMPLE_MASK_VALUE_SGIS, and SAMPLE_MASK_INVERT_SGIS.  No changes to the
  309.     fragment alpha or mask values are made at this step if MULTISAMPLE_SGIS
  310.     is disabled, or if SAMPLE_BUFFERS_SGIS is zero.
  311.  
  312.     SAMPLE_ALPHA_TO_MASK_SGIS, SAMPLE_ALPHA_TO_ONE_SGIS, and SAMPLE_MASK_SGIS
  313.     are enabled and disabled by calling Enable and Disable with <cap>
  314.     specified as one of the three token values.  All three values are
  315.     queried by calling IsEnabled, with <cap> set to the desired token value.
  316.     If SAMPLE_ALPHA_TO_MASK_SGIS is enabled, the fragment alpha value is
  317.     used to generate a temporary mask value, which is then ANDed with the
  318.     fragment mask value.  Otherwise the fragment mask value is unchanged at
  319.     this point.
  320.  
  321.     This specification does not require a specific algorithm for converting
  322.     an alpha value to a temporary mask value.  It is intended that the number
  323.     of 1's in the temporary mask be proportional to the alpha value, with
  324.     all 1's corresponding to the maximum alpha value, and all 0's
  325.     corresponding to an alpha value of 0.  It is also intended that the
  326.     algorithm be pseudo-random in nature, to avoid image artifacts due
  327.     to regular mask patterns.  The algorithm can and probably should be
  328.     different at different pixel locations.  If it does differ, it should
  329.     be defined relative to window, not screen, coordinates, so that
  330.     rendering results are invariant with respect to window position.
  331.  
  332.     Next, if SAMPLE_ALPHA_TO_ONE_SGIS is enabled, fragment alpha is replaced
  333.     by the maximum representable alpha value.  Otherwise, fragment alpha
  334.     value is not changed.
  335.  
  336.     Finally, if SAMPLE_MASK_SGIS is enabled, the fragment mask is ANDed
  337.     with another temporary mask.  This temporary mask is generated in the
  338.     same manner as the one described above, but as a function of the value
  339.     of SAMPLE_MASK_VALUE_SGIS.  The function need not be identical, but it
  340.     must have the same properties of proportionality and invariance.  If
  341.     SAMPLE_MASK_INVERT_SGIS is TRUE, the temporary mask is inverted (all
  342.     bit values are inverted) before it is ANDed with the fragment mask.
  343.  
  344.     The values of SAMPLE_MASK_VALUE_SGIS and SAMPLE_MASK_INVERT_SGIS are
  345.     specified simultaneously by calling SampleMaskSGIS, with <value> set
  346.     to the desired mask value, and <invert> set to TRUE or FALSE.  <value>
  347.     is clamped to [0,1] before being stored as SAMPLE_MASK_VALUE_SGIS.
  348.     SAMPLE_MASK_VALUE_SGIS is queried by calling GetFloatv with <pname> set
  349.     to SAMPLE_MASK_VALUE_SGIS.  SAMPLE_MASK_INVERT_SGIS is queried by calling
  350.     GetBooleanv with <pname> set to SAMPLE_MASK_INVERT_SGIS.
  351.  
  352.     4.1.9 Multisample Fragment Operations
  353.  
  354.     If the DrawBuffers mode is NONE, no change is made to any multisample
  355.     or color buffer.  Otherwise, fragment processing is as described below.
  356.  
  357.     If MULTISAMPLE_SGIS is enabled, and SAMPLE_BUFFERS_SGIS is one, the
  358.     stencil test, depth test, blending, and dithering operations described
  359.     in sections 4.1.4, 4.1.5, 4.1.6, and 4.1.7 are performed for each
  360.     pixel sample, rather than just once for each fragment.  Failure
  361.     of the stencil or depth test results in termination of the processing
  362.     of that sample, rather than discarding of the fragment.  All operations
  363.     are performed on the color, depth, and stencil values stored in the
  364.     multisample buffer (to be described in a following section).  The
  365.     contents of the color buffers are not modified at this point.
  366.  
  367.     Stencil, depth, blending, and dithering operations are performed
  368.     for a pixel sample only if that sample's fragment mask bit is 1.  If
  369.     the corresponding mask bit is 0, no operations are performed for that
  370.     sample.  Depth operations use the fragment depth value that is
  371.     specific to each sample.  The single fragment color value is used for
  372.     all sample operations, however, as is the current stencil value.
  373.  
  374.     If MULTISAMPLE_SGIS is disabled, and SAMPLE_BUFFERS_SGIS is one, the
  375.     fragment may be treated exactly as described above, with optimization
  376.     possible because the fragment mask must be all 1's.  Further
  377.     optimization is allowed, however.  An implementation may choose to
  378.     identify a centermost sample, and to perform stencil and depth tests
  379.     on only that sample.  Regardless of the outcome of the stencil test,
  380.     all multisample buffer stencil sample values are set to the appropriate
  381.     new stencil value.  If the depth test passes, all multisample buffer
  382.     depth sample values are set to the depth of the fragment's centermost
  383.     sample's depth value, and all multisample buffer color sample values
  384.     are set to the color value of the incoming fragment.  Otherwise, no
  385.     change is made to any multisample buffer color or depth value.
  386.  
  387.     After all operations have been completed on the multisample buffer,
  388.     the color sample values are combined to produce a single color value,
  389.     and that value is written into each color buffer that is currently
  390.     enabled, based on the DrawBuffers mode.  The method of combination is
  391.     not specified, though a simple average computed independently for each
  392.     color component is recommended.
  393.  
  394.     4.2.2.5 Fine Control of Multisample Buffer Updates
  395.  
  396.     When SAMPLE_BUFFERS_SGIS is one, ColorMask, DepthMask, and StencilMask
  397.     control the modification of values in the multisample buffer.  The
  398.     color mask has no effect on modifications to the color buffers.  If
  399.     the color mask is entirely disabled, the color sample values must
  400.     still be combined (as described above) and the result used to replace
  401.     the color values of the buffers enabled by DrawBuffers.
  402.  
  403.     4.2.3.5 Clearing the Multisample Buffer
  404.  
  405.     The color samples of the multisample buffer are cleared when one or
  406.     more color buffers are cleared, as specified by the Clear mask bit
  407.     COLOR_BUFFER_BIT and the DrawBuffers mode.  If the DrawBuffers mode is
  408.     NONE, the color samples of the multisample buffer cannot be cleared.
  409.     
  410.     Clear mask bits DEPTH_BUFFER_BIT and STENCIL_BUFFER_BIT indicate that
  411.     the depth and stencil samples of the multisample buffer are to be
  412.     cleared.  If Clear mask bit DEPTH_BUFFER_BIT is specified, and if
  413.     the DrawBuffers mode is not NONE, then the multisample depth buffer
  414.     samples are cleared.  Likewise, if Clear mask bit STENCIL_BUFFER_BIT
  415.     is specified, and if the DrawBuffers mode is not NONE, then the
  416.     multisample stencil buffer is cleared.
  417.  
  418.     4.3.2 Reading Pixels
  419.  
  420.     [These changes are made to the text in section 4.3.2, following the
  421.     subheading Obtaining Pixels from the Framebuffer.]
  422.  
  423.     Follow the sentence "If there is no depth buffer, the error
  424.     INVALID_OPERATION occurs." with: If there is a multisample buffer
  425.     (SAMPLE_BUFFERS_SGIS is 1) then values are obtained from the depth
  426.     samples in this buffer.  It is recommended that the depth value
  427.     of the centermost sample be used, though implementations may choose
  428.     any function of the depth sample values at each pixel.
  429.  
  430.     Follow the sentence "if there is no stencil buffer, the error
  431.     INVALID_OPERATION occurs." with: If there is a multisample buffer,
  432.     then values are obtained from the stencil samples in this buffer.
  433.     It is recommended that the stencil value of the centermost sample
  434.     be used, though implementations may choose any function of the stencil
  435.     sample values at each pixel.
  436.  
  437.     This extension makes no change to the way that color values are
  438.     obtained from the framebuffer.
  439.  
  440. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  441.  
  442.     None
  443.  
  444. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  445.  
  446.     An additional group of state variables, MULTISAMPLE_BIT_SGIS, is defined
  447.     by this extension.  When PushAttrib is called with bit MULTISAMPLE_BIT_SGIS
  448.     set, the multisample group of state variables is pushed onto the
  449.     attribute stack.  When PopAttrib is called, these state variables are
  450.     restored to their previous values if they were pushed.  Some multisample
  451.     state is included in the ENABLE_BIT group as well.  In order to avoid
  452.     incompatibility with GL implementations that do not support
  453.     SGIS_multisample, ALL_ATTRIB_BITS does not include MULTISAMPLE_BIT_SGIS.
  454.  
  455. Additions to the GLX Specification
  456.  
  457.     The parameter GLX_SAMPLE_BUFFERS_SGIS is added to glXGetConfig.  When
  458.     queried, by calling glXGetConfig with <attrib> set to
  459.     GLX_SAMPLE_BUFFERS_SGIS, it returns the number of multisample buffers
  460.     included in the visual.  For a normal visual, the return value is zero.
  461.     A return value of one indicates that a single multisample buffer is
  462.     available.  The number of samples per pixel is queried by calling
  463.     glXGetConfig with <attrib> set to GLX_SAMPLES_SGIS.  It is understood
  464.     that the number of color, depth, and stencil bits per sample in the
  465.     multisample buffer are as specified by the GLX_*_SIZE parameters.  It
  466.     is also understood that there are no single-sample depth or stencil
  467.     buffers associated with this visual -- the only depth and stencil
  468.     buffers are those in the multisample buffer.  GLX_SAMPLES_SGIS is zero
  469.     if GLX_SAMPLE_BUFFERS_SGIS is zero.
  470.  
  471.     glXChooseVisual accepts GLX_SAMPLE_BUFFERS_SGIS in <attribList>,
  472.     followed by the minimum number of multisample buffers that can be
  473.     accepted.  Visuals with the smallest number of multisample buffers
  474.     that meets or exceeds the specified minimum number are preferred.
  475.     Currently operation with more than one multisample buffer is undefined,
  476.     so the returned value will be either zero or one.
  477.  
  478.     glXChooseVisual accepts GLX_SAMPLES_SGIS in <attribList>, followed by
  479.     the minimum number of samples that can be accepted in the multisample
  480.     buffer.  Visuals with the smallest number of samples that meets or
  481.     exceeds the specified minimum number are preferred.
  482.  
  483.     If the color samples in the multisample buffer store fewer bits than
  484.     are stored in the color buffers, this fact will not be reported
  485.     accurately.  Presumably a compression scheme is being employed, and is
  486.     expected to maintain an aggregate resolution equal to that of the
  487.     color buffers.
  488.  
  489. Dependencies on SGIX_pixel_texture
  490.  
  491.     As described in the text in section 3.6.4, located in the Rasterization
  492.     section of this document.
  493.  
  494. Errors
  495.  
  496.     INVALID_ENUM is generated if SamplePatternSGIS parameter <pattern> is
  497.     not 1PASS_SGIS, 2PASS_0_SGIS, 2PASS_1_SGIS, 4PASS_0_SGIS, 4PASS_1_SGIS,
  498.     4PASS_2_SGIS, or 4PASS_3_SGIS.
  499.  
  500.     INVALID_OPERATION is generated if SampleMaskSGIS or SamplePatternSGIS
  501.     is called between the execution of Begin and the execution of the
  502.     corresponding End.
  503.  
  504. New State
  505.  
  506.     Get Value            Get Command    Type    Initial Value    Attribute
  507.     ---------            -----------    ----    -------------    ---------
  508.     MULTISAMPLE_SGIS        IsEnabled    B    TRUE        multisample/enable
  509.     SAMPLE_ALPHA_TO_MASK_SGIS    IsEnabled    B    FALSE        multisample/enable
  510.     SAMPLE_ALPHA_TO_ONE_SGIS    IsEnabled    B    FALSE        multisample/enable
  511.     SAMPLE_MASK_SGIS        IsEnabled    B    FALSE        multisample/enable
  512.     SAMPLE_MASK_VALUE_SGIS    GetFloatv    R+    1        multisample
  513.     SAMPLE_MASK_INVERT_SGIS    GetBooleanv    B    FALSE        multisample
  514.     SAMPLE_PATTERN_SGIS        GetIntegerv    Z7    1PASS_SGIS    multisample
  515.  
  516. New Implementation Dependent State
  517.  
  518.     Get Value        Get Command    Type    Minimum Value
  519.     ---------        -----------    ----    -------------
  520.     SAMPLE_BUFFERS_SGIS    GetIntegerv    Z+    0
  521.     SAMPLES_SGIS    GetIntegerv    Z+    0
  522.