home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / opengldoc / glspec / pbuffer.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  22.2 KB  |  526 lines

  1. Name
  2.  
  3.     SGIX_pbuffer
  4.  
  5. Name Strings
  6.  
  7.     GLX_SGIX_pbuffer
  8.  
  9. Version
  10.  
  11.     $Date: 1996/04/02 00:08:26 $ $Revision: 1.2 $
  12.  
  13. Number
  14.  
  15.     50
  16.  
  17. Dependencies
  18.  
  19.     SGIX_FBConfig is required
  20.     SGIS_multisample affects the definition of this extension
  21.  
  22. Overview
  23.  
  24.     This extension defines pixel buffers (GLXPbuffers, or pbuffer for
  25.     short). GLXPbuffers are additional non-visible rendering buffers for an
  26.     OpenGL renderer.  GLXPbuffers are equivalent to GLXPixmaps with the
  27.     following exceptions:
  28.  
  29.     1.    There is no associated X pixmap. Also, since a GLXPbuffer is a GLX
  30.         resource, it may not be possible to render to it using X or an 
  31.        X extension other than GLX.
  32.  
  33.     2.    The format of the color buffers and the type and size of any
  34.          associated ancillary buffers for a GLXPbuffer can only be
  35.         described with a GLXFBConfig -- an X Visual cannot be used.
  36.  
  37.     3.    It is possible to create a GLXPbuffer whose contents may be 
  38.     asynchronously lost at any time.
  39.  
  40.     4.  GLXPbuffers can be rendered to using either direct or indirect
  41.         rendering contexts.
  42.  
  43.     The intent of the pbuffer semantics is to enable implementations to
  44.     allocate pbuffers in non-visible frame buffer memory.  These
  45.     pbuffers are intended to be "static" resources, in that a program
  46.     will typically allocate them only once, rather than as a part of its
  47.     rendering loop.  (But they should be deallocated when the program is
  48.     no longer using them -- for example, if the program is iconified.)
  49.     The frame buffer resources that are associated with a pbuffer are 
  50.     also static, and are deallocated only when the pbuffer is destroyed, 
  51.     or, in the case of a "unpreserved" pbuffer, as a result of X server 
  52.     activity that changes its frame buffer requirements.
  53.  
  54.  
  55. Issues
  56.  
  57.     *   Should the optimum width and height be fixed sizes or a multiple?
  58.    
  59.     *   Any better names for GLX_BUFFER_CLOBBER_MASK_SGIX, etc?
  60.  
  61.     UM  Should we add a command so an application can set the behavior
  62.         when a deep window buffer (e.g., depth buffer or multisample buffer)
  63.         is clobbered by a pbuffer? The choices would be "preserved" or
  64.         "unpreserved". 
  65.  
  66.     *   When a pbuffer interferes with a window's ancillary buffer should
  67.         the action -- swapped or saved -- be specified or left as
  68.     implementation dependent?
  69.     
  70.  
  71. New Procedures and Functions
  72.  
  73.     GLXPbuffer glXCreateGLXPbufferSGIX(Display *dpy,
  74.                        GLXFBConfig config,
  75.                        unsigned int width,
  76.                        unsigned int height,
  77.                        int *attrib_list);
  78.  
  79.     void glXDestroyGLXPbufferSGIX(Display *dpy,
  80.                       GLXPbuffer pbuf);
  81.  
  82.     void glXQueryGLXPbufferSGIX(Display *dpy,
  83.                     GLXPbuffer pbuf,
  84.                     int attribute,
  85.                     unsigned int *value);
  86.  
  87.     void glXSelectEventSGIX(Display *dpy,
  88.                   GLXDrawable drawable,
  89.                 unsigned long mask);
  90.  
  91.     void glXGetSelectedEventSGIX(Display *dpy,
  92.                            GLXDrawable drawable,
  93.                      unsigned long *mask);
  94.  
  95.  
  96. New Tokens
  97.  
  98.     Accepted by the <attribute> parameter of glXGetFBConfigAttribSGIX:
  99.  
  100.         GLX_MAX_PBUFFER_WIDTH_SGIX        0x8016
  101.         GLX_MAX_PBUFFER_HEIGHT_SGIX        0x8017
  102.         GLX_MAX_PBUFFER_PIXELS_SGIX        0x8018
  103.         GLX_OPTIMAL_PBUFFER_WIDTH_SGIX        0x8019
  104.         GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX        0x801A
  105.  
  106.     Returned by glXGetFBConfigAttribSGIX (when <attribute> is set to 
  107.     GLX_DRAWABLE_TYPE_SGIX) and accepted by the <attrib_list> parameter of 
  108.     glXChooseFBConfigSGIX (following the GLX_DRAWABLE_TYPE_SGIX token):
  109.  
  110.     GLX_PBUFFER_BIT_SGIX            0x00000004
  111.  
  112.     Accepted by the <attrib_list> parameter of glXCreateGLXPbufferSGIX
  113.     and by the <attribute> parameter of glXQueryGLXPbufferSGIX:
  114.  
  115.         GLX_PRESERVED_CONTENTS_SGIX        0x801B
  116.         GLX_LARGEST_PBUFFER_SGIX        0x801C
  117.  
  118.     Accepted by the <attribute> parameter of glXQueryGLXPbufferSGIX:
  119.  
  120.         GLX_WIDTH_SGIX                 0x801D
  121.         GLX_HEIGHT_SGIX                0x801E
  122.     GLX_EVENT_MASK_SGIX            0x801F
  123.  
  124.     Accepted by the <mask> parameter of glXSelectEventSGIX and returned
  125.     in the <mask> parameter of glXGetSelectedEventSGIX:
  126.  
  127.     GLX_BUFFER_CLOBBER_MASK_SGIX          0x08000000
  128.  
  129.     Returned in the <event_type> field of a "buffer clobber" event:
  130.  
  131.     GLX_DAMAGED_SGIX             0x8020
  132.     GLX_SAVED_SGIX                0x8021
  133.  
  134.     Returned in the <draw_type> field of a "buffer clobber" event:
  135.  
  136.         GLX_WINDOW_SGIX                0x8022
  137.     GLX_PBUFFER_SGIX            0x8023
  138.  
  139.     Returned in the <mask> field of a "buffer clobber" event:
  140.  
  141.     GLX_FRONT_LEFT_BUFFER_BIT_SGIX        0x00000001
  142.     GLX_FRONT_RIGHT_BUFFER_BIT_SGIX        0x00000002
  143.     GLX_BACK_LEFT_BUFFER_BIT_SGIX        0x00000004
  144.     GLX_BACK_RIGHT_BUFFER_BIT_SGIX        0x00000008
  145.     GLX_AUX_BUFFERS_BIT_SGIX        0x00000010
  146.     GLX_DEPTH_BUFFER_BIT_SGIX        0x00000020
  147.     GLX_STENCIL_BUFFER_BIT_SGIX        0x00000040
  148.     GLX_ACCUM_BUFFER_BIT_SGIX        0x00000080
  149.     GLX_SAMPLE_BUFFERS_BIT_SGIX        0x00000100
  150.  
  151. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  152.  
  153.     None
  154.  
  155. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  156.  
  157.     None
  158.  
  159. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  160. and the Frame buffer)
  161.  
  162.     None
  163.  
  164. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  165.  
  166.     None
  167.  
  168. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  169.  
  170.     None
  171.  
  172. Additions to the GLX Specification
  173.  
  174.     [Add the following to section 3.2.2 on Configuration Management]
  175.  
  176.     [Add to glXGetFBConfigAttribSGIX]:
  177.  
  178.     GLX_MAX_PBUFFER_WIDTH_SGIX and GLX_MAX_PBUFFER_HEIGHT_SGIX indicate the
  179.     maximum width and height that can be passed into glXCreateGLXPbufferSGIX and
  180.     GLX_MAX_PBUFFER_PIXELS_SGIX indicates the maximum number of pixels (width x
  181.     hieght) for a GLXPbuffer. Note that an implementation may return a value for
  182.     GLX_MAX_PBUFFER_PIXELS_SGIX that is less than the maximum width times the
  183.     maximum height. Also, the value for GLX_MAX_PBUFFER_PIXELS_SGIX is static
  184.     and assumes that no other pbuffers or X resources are contending for the
  185.     framebuffer memory. Thus it may not be possible to allocate a pbuffer of
  186.     the size given by GLX_MAX_PBUFFER_PIXELS_SGIX.
  187.  
  188.     On some implementations, there may be an optimum width and height to use
  189.     when allocating a pbuffer. (For example, the implementation may use fixed
  190.     size tiles to allocate pbuffers.) Use GLX_OPTIMAL_PBUFFER_WIDTH_SGIX and
  191.     GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX to determine this width and height. If the
  192.     values are zero then there is no optimal value.
  193.  
  194.     [Add to glXChooseFBConfigSGIX]:
  195.  
  196.     If GLX_OPTIMAL_PBUFFER_WIDTH_SGIX and/or GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 
  197.     are specified in <attrib_list> then they are ignored.
  198.  
  199.     [Additions to tables 2 and 3, given in SGIX_FBConfig]
  200.  
  201.       Attribute                       Type        Description
  202.       ---------                       ----        -----------
  203.       GLX_BUFFER_SIZE                 integer     depth of the color buffer
  204.       GLX_LEVEL                       integer     frame buffer level
  205.       GLX_DOUBLEBUFFER                boolean     True if color buffers have
  206.                           front/back pairs
  207.       GLX_STEREO                      boolean     True if color buffers have
  208.                                 left/right pairs
  209.       GLX_AUX_BUFFERS                 integer     number of auxiliary color
  210.                           buffers 
  211.       GLX_RED_SIZE                    integer     number of bits of Red if in
  212.                                 RGB mode
  213.       GLX_GREEN_SIZE                  integer     number of bits of Green if in
  214.                                 RGB mode
  215.       GLX_BLUE_SIZE                   integer     number of bits of Blue if in
  216.                                 RGB mode
  217.       GLX_ALPHA_SIZE                  integer     number of bits of Alpha if in
  218.                                 RGB mode
  219.       GLX_DEPTH_SIZE                  integer     number of bits in the depth
  220.                                 buffer
  221.       GLX_STENCIL_SIZE                integer     number of bits in the stencil
  222.                                 buffer
  223.       GLX_ACCUM_RED_SIZE              integer     number of bits of Red in the
  224.                                  accumulation buffer
  225.       GLX_ACCUM_GREEN_SIZE            integer     number of bits of Green in the
  226.                                 accumulation buffer
  227.       GLX_ACCUM_BLUE_SIZE             integer     number of bits of Blue in the
  228.       accumulation buffer
  229.       GLX_ACCUM_ALPHA_SIZE            integer     number of bits of Alpha in the
  230.                                 accumulation buffer
  231.       GLX_SAMPLE_BUFFERS_SGIS         integer     number of multisample buffers
  232.       GLX_SAMPLES_SGIS                integer     number of samples stored in
  233.                           each multisample buffer
  234.       GLX_X_VISUAL_TYPE_EXT           integer     X visual type of the
  235.                           associated visual
  236.       GLX_TRANSPARENT_TYPE_EXT        enum        GLX_NONE_EXT,
  237.                                                   TRANSPARENT_RGB_EXT, or 
  238.                                                   TRANSPARENT_INDEX_EXT
  239.       GLX_TRANSPARENT_INDEX_VALUE_EXT integer     transparent index value.
  240.       GLX_TRANSPARENT_RED_VALUE_EXT   color       transparent color value.
  241.       GLX_TRANSPARENT_GREEN_VALUE_EXT color       transparent color value.
  242.       GLX_TRANSPARENT_BLUE_VALUE_EXT  color       transparent color value.
  243.       GLX_TRANSPARENT_ALPHA_VALUE_EXT color       transparent color value.
  244.       GLX_VISUAL_CAVEAT_EXT           enum        GLX_NONE_EXT or
  245.                                 GLX_SLOW_VISUAL_EXT
  246.       GLX_DRAWABLE_TYPE_SGIX          bitmask     mask indicating which GLX
  247.                                 drawables are supported. Valid
  248.                           bits are GLX_WINDOW_BIT_SGIX and
  249.                                                   GLX_PIXMAP_BIT_SGIX
  250.       GLX_RENDER_TYPE_SGIX            bitmask     mask indicating which OpenGL
  251.                                 rendering modes are supported.
  252.                           Valid bits are GLX_RGBA_BIT_SGIX
  253.                           and GLX_COLOR_INDEX_SGIX.
  254.       GLX_X_RENDERABLE_SGIX           boolean     True if X can render to drawable
  255.       GLX_MAX_PBUFFER_WIDTH_SGIX      integer      maximum width of GLXPbuffer
  256.       GLX_MAX_PBUFFER_HEIGHT_SGIX     integer      maximum height of GLXPbuffer
  257.       GLX_MAX_PBUFFER_PIXELS_SGIX     integer      maximum size of GLXPbuffer
  258.       GLX_OPTIMAL_PBUFFER_WIDTH_SGIX  integer     best width to use when
  259.                           creating pbuffer, or zero if
  260.                           all widths are equally good.
  261.       GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX integer     best height to use when creating 
  262.                           pbuffer, or zero if all
  263.                           heights are equally good.
  264.  
  265.       Table 3: GLX configuration attributes for GLXFBConfigs (Note that
  266.                GLX_RGBA and GLX_USE_GL are not supported)
  267.  
  268.       Attribute                               Default             Match Criteria
  269.       ---------                               -------             --------------
  270.       GLX_BUFFER_SIZE                         0                   minimum
  271.       GLX_LEVEL                               0                   exact
  272.       GLX_DOUBLEBUFFER                        don't care          exact
  273.       GLX_STEREO                              False               exact
  274.       GLX_AUX_BUFFERS                         0                   minimum
  275.       GLX_RED_SIZE                            0                   minimum
  276.       GLX_GREEN_SIZE                          0                   minimum
  277.       GLX_BLUE_SIZE                           0                   minimum
  278.       GLX_ALPHA_SIZE                          0                   minimum
  279.       GLX_DEPTH_SIZE                          0                   minimum
  280.       GLX_STENCIL_SIZE                        0                   minimum
  281.       GLX_ACCUM_RED_SIZE                      0                   minimum
  282.       GLX_ACCUM_GREEN_SIZE                    0                   minimum
  283.       GLX_ACCUM_BLUE_SIZE                     0                   minimum
  284.       GLX_ACCUM_ALPHA_SIZE                    0                   minimum
  285.       GLX_SAMPLE_BUFFERS_SGIS                 0                   minimum
  286.       GLX_SAMPLES_SGIS                        0                   minimum
  287.       GLX_X_VISUAL_TYPE_EXT                   don't care          exact
  288.       GLX_TRANSPARENT_PIXEL_EXT               GLX_NONE_EXT        exact
  289.       GLX_TRANSPARENT_INDEX_VALUE_EXT         don't care          exact
  290.       GLX_TRANSPARENT_RED_VALUE_EXT           don't care          exact
  291.       GLX_TRANSPARENT_GREEN_VALUE_EXT         don't care          exact
  292.       GLX_TRANSPARENT_BLUE_VALUE_EXT          don't care          exact
  293.       GLX_TRANSPARENT_ALPHA_VALUE_EXT         don't care          exact
  294.       GLX_VISUAL_CAVEAT_EXT                   don't care          exact
  295.       GLX_DRAWABLE_TYPE_SGIX                  GLX_WINDOW_BIT_SGIX minimum
  296.       GLX_RENDER_TYPE_SGIX                    GLX_RGBA_BIT_SGIX   minimum
  297.       GLX_X_RENDERABLE_SGIX                   don't care          exact
  298.       GLX_FBCONFIG_ID_SGIX                    don't care          exact
  299.       GLX_MAX_PBUFFER_WIDTH_SGIX                0           minimum
  300.       GLX_MAX_PBUFFER_HEIGHT_SGIX              0              minimum
  301.       GLX_MAX_PBUFFER_PIXELS_SGIX             0           minimum
  302.       GLX_OPTIMAL_PBUFFER_WIDTH_SGIX          ignored          ignored
  303.       GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX         ignored          ignored
  304.  
  305.       Table 4: Default values and match criteria for GLX configuration
  306.                attributes for GLXFBConfigs 
  307.  
  308.  
  309.     [Add the following to section 3.2.3 on Offscreen Rendering]
  310.  
  311.     To create a GLXPbuffer call:
  312.  
  313.         GLXPbuffer glXCreateGLXPbufferSGIX(Display *dpy,
  314.                            GLXFBConfig config,
  315.                            unsigned int width,
  316.                            unsigned int height,
  317.                            int *attrib_list);
  318.  
  319.     This creates a single GLXPbuffer and returns its XID. <width> and <height>
  320.     specify the pixel width and height of the rectangular pbuffer and
  321.     <attrib_list> specifies a list of attributes for the pbuffer. Currently
  322.     only two attributes can be specified in <attrib_list>:
  323.     GLX_PRESERVED_CONTENTS_SGIX and GLX_LARGEST_PBUFFER_SGIX.
  324.  
  325.     <attrib_list> can be either NULL, in which case all the attributes assume
  326.     their default values as described below.  If it not NULL then its format is
  327.     similar to the attribute list paramter of glXChooseFBConfigSGIX: each
  328.     attribute is immediately followed by the corresponding desired value and the
  329.     list is terminated with None.
  330.  
  331.     Use GLX_LARGEST_PBUFFER_SGIX to get the largest available pbuffer when
  332.     the allocation of the pbuffer would otherwise fail.  The width or height
  333.     of the allocated pbuffer never exceed <width> and <height>,
  334.     respectively. Use glXQueryGLXPbufferSGIX to retrieve the dimensions of the
  335.     allocated pbuffer.  By default, GLX_LARGEST_PBUFFER_SGIX is False.
  336.     
  337.     If the GLX_PRESERVED_CONTENTS_SGIX attribute is set to False in
  338.     <attrib_list>, then an "unpreserved" pbuffer is created and the contents
  339.     of the pbuffer may be lost at any time. If this attribute is not
  340.     specified, or if it is specified as True in <attrib_list>, then when a
  341.     resource conflict occurs the contents of the pbuffer will be preserved
  342.     (most likely by swapping out portions of the buffer to main memory).  In
  343.     either case, the client can register to receive a "buffer clobber" event
  344.     which is generated when the pbuffer contents have been preserved or have
  345.     been damaged. (See the event description.)
  346.  
  347.     The resulting pbuffer will contain color buffers and ancillary
  348.     as specified by <config>. It is possible to create a pbuffer with 
  349.     back buffers and to swap the front and back buffers by calling
  350.     glXSwapBuffers. Note that pbuffers use framebuffer resources so 
  351.     applications should consider deallocating them when they are not in use.
  352.  
  353.     Any GLX rendering context created with a GLXFBConfig or X Visual that is
  354.     "compatible" with the <config> may be used to render into the pbuffer. (See
  355.     description of glXCreateContextWithConfigSGIX, glXMakeCurrent and
  356.     glXMakeCurrentReadSGI for definition of "compatible".)  If a pbuffer is
  357.     created with GLX_PRESERVED_CONTENTS_SGIX set to False, then portion of the
  358.     buffer contents may be lost at any time due to frame buffer resource
  359.     conflicts.  Once the contents of a "non preserved" pbuffer has been lost it
  360.     is considered to be in a "damaged" state.  It is not an error to render to a
  361.     pbuffer that is in this state but the effect of rendering to it is
  362.     undefined. It is also not an error to query the pixel contents of such a
  363.     pbuffer, but the values of the returned pixels are undefined.  Note, that
  364.     while this specification allows for non preserved pbuffers to be damaged as
  365.     a result of other pbuffer activity, the intent is to only have visible
  366.     windows activity "damage" pbuffers.
  367.  
  368.     Since the contents of a "unpreserved" pbuffer can be lost at anytime 
  369.     with only asynchronous notification (via the "buffer clobber" event), the 
  370.     only way a client can guarantee that valid pixels are read back with 
  371.     glReadPixels is by grabbing the X server. (Note that this operation is 
  372.     potentially expensive and should not be done frequently. Also, since this 
  373.     locks out other X clients, it should only be done for short periods of 
  374.     time.) Clients that don't wish to do this can check if the data returned 
  375.     by glReadPixels is valid by calling XSync and then checking the event 
  376.     queue for "buffer clobber" events (assuming that these events had been 
  377.     pulled off of the queue prior to the glReadPixels call). 
  378.     
  379.     When glXCreateGLXPbufferSGIX fails to create a GLXPbuffer due to
  380.     insufficient resources, a BadAlloc error is generated and None is
  381.     returned. If <config> is not a valid GLXFBConfig then a GLXBadFBConfigSGIX
  382.     error is generated; if <config> does not support GLXPbuffers then a BadMatch
  383.     error is generated.
  384.  
  385.     A GLXPbuffer is destroyed by calling:
  386.  
  387.         void glXDestroyGLXPbufferSGIX(Display *dpy,
  388.                           GLXPbuffer pbuf);
  389.  
  390.     The GLXPbuffer will be destroyed once it is no longer current to any
  391.     client. When a GLXPbuffer is destroyed, any memory resources that are
  392.     attached to it are freed, and its XID is made available for reuse.
  393.  
  394.     If <pbuf> is not a valid GLXPbuffer then a GLXBadPbufferSGIX error
  395.     is generated.
  396.  
  397.     To query an attribute associated with a GLXPbuffer call
  398.  
  399.         void glXQueryGLXPbufferSGIX(Display* dpy,
  400.                         GLXPbuffer pbuf,
  401.                         int attribute,
  402.                         unsigned int *value);
  403.  
  404.     <attribute> must be set to one of GLX_WIDTH_SGIX, GLX_HEIGHT_SGIX,
  405.     GLX_PRESERVED_CONTENTS_SGIX, GLX_LARGEST_PBUFFER_SGIX, or
  406.     GLX_FBCONFIG_ID_SGIX.
  407.  
  408.     To get the GLXFBConfig for a GLXPbuffer, first retrieve the i.d.  for the
  409.     FBConfig and then call glXChooseFBConfigSGIX.
  410.  
  411.     If <pbuf> is not a valid GLXPbuffer then a GLXBadPbufferSGIX error is
  412.     generated.
  413.  
  414.  
  415.     [Add new section, Events]
  416.  
  417.     A client can ask to receive GLX events on a window or GLXPbuffer.
  418.  
  419.       void glXSelectEventSGIX(Display *dpy,
  420.                     GLXDrawable drawable,
  421.                   unsigned long mask);
  422.  
  423.     Currently only one GLX event, GLX_BUFFER_CLOBBER_MASK_SGIX, can be selected:
  424.  
  425.       typdef struct {
  426.     int event_type;          /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
  427.         int draw_type;        /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
  428.     unsigned long serial; /* # of last request processed by server */
  429.     Bool send_event;      /* event was generated by a SendEvent request */
  430.         Display *display;     /* display the event was read from */
  431.         GLXDrawable drawable; /* i.d. of Drawable */
  432.         unsigned int mask;    /* mask indicating which buffers are affected*/
  433.         int x, y;
  434.         int width, height;
  435.         int count;            /* if nonzero, at least this many more */
  436.       } GLXBufferClobberEventSGIX;
  437.  
  438.     A single X server operation can cause several "buffer clobber" events to be
  439.     sent. (e.g., a single pbuffer may be damaged and cause multiple "buffer
  440.     clobber" events to be generated). Each event specifies one region of the
  441.     GLXDrawable that was affected by the X Server operation. <mask> indicates
  442.     which color or ancillary buffers were affected. All the "buffer clobber"
  443.     events generated by a single X server action are guaranteed to be contiguous
  444.     in the event queue. The conditions under which this event is generated and
  445.     the event <type> varies, depending on the type of the GLXDrawable.
  446.  
  447.     For "preserved" pbuffers, a "buffer clobber" event, with <type>
  448.     GLX_SAVED_SGIX, is generated whenever the contents of a pbuffer has to be
  449.     moved to avoid being damaged.  The event(s) describes which portions of the
  450.     pbuffer were affected. Clients who receive many "buffer clobber" events,
  451.     referring to different save actions, should consider freeing the pbuffer
  452.     resource in order to prevent the system from thrashing due to insufficient
  453.     resources.
  454.  
  455.     For an "unpreserved" pbuffer a "buffer clobber" event, with <type>
  456.     GLX_DAMAGED_SGIX, is generated whenever a portion of the pbuffer becomes
  457.     invalid.
  458.  
  459.     For Windows, "buffer clobber" events, with <type> GLX_DAMAGED_SGIX or
  460.     GLX_SAVED_SGIX, occur whenever an ancillary buffer, associated with the
  461.     window, gets clobbered or moved out of offscreen memory. The event contains
  462.     information indicating which color or ancillary buffers, and which
  463.     portions of those buffers, were affected.
  464.  
  465.     Calling glXSelectEventSGIX overrides any previous event mask that was set by
  466.     the client for <drawable>. Note that a separate event mask is maintained for
  467.     each client that requested "clobber events" for <drawable>.
  468.  
  469.     If <drawable> is not a valid GLXPbuffer or a valid Window, a GLXBadDrawable
  470.     error is generated.
  471.  
  472.     To find out which GLX events are selected for a window or GLXPbuffer call
  473.  
  474.       void glXGetSelectedEventSGIX(Display *dpy,
  475.                          GLXDrawable drawable,
  476.                        unsigned long *mask);
  477.  
  478.  
  479. GLX Protocol
  480.  
  481. >>> to be filled in
  482.  
  483.     One new event is added:
  484.  
  485.       BEC is the base event code for the extension, as returned by 
  486.       QueryExtension.
  487.  
  488.       GLX_BUFFER_CLOBBER_MASK_SGIX
  489.         1            BEC+16           code
  490.         1                unused
  491.         2        CARD16        sequence number
  492.         2        CARD16        event_type
  493.             0x8017        GLX_DAMAGED_SGIX
  494.             0x8018        GLX_SAVED_SGIX
  495.         2        CARD16        draw_type
  496.             0x8019        GLX_WINDOW_SGIX
  497.                         0x801A        GLX_PBUFFER_SGIX
  498.         4        GLX_DRAWABLE    drawable
  499.             4        BITFIELD    mask
  500.         2        CARD16        x
  501.         2        CARD16        y
  502.         2        CARD16        width
  503.         2        CARD16        height
  504.         2        CARD16        count
  505.         6                unused
  506.  
  507. Dependencies on SGIS_multisample
  508.  
  509.     If SGIS_multisample is not supported, references to
  510.     GLX_SAMPLE_BUFFERS_BIT_SGIX in this document are invalid and should be
  511.     ignored.
  512.  
  513. Errors
  514.  
  515.     One new GLX errors is introduced:
  516.  
  517.         GLXBadPbufferSGIX
  518.  
  519. New State
  520.  
  521.     None
  522.  
  523. New Implementation Dependent State
  524.  
  525.     None
  526.