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 / make_current_read.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  5.3 KB  |  155 lines

  1. Name
  2.  
  3.     SGI_make_current_read
  4.  
  5. Name Strings
  6.  
  7.     GLX_SGI_make_current_read
  8.  
  9. Version
  10.  
  11.     $Date: 1995/09/30 02:31:42 $ $$
  12.  
  13. Number
  14.  
  15.     42
  16.  
  17. Dependencies
  18.  
  19.     EXT_copy_texture is affected by this specification.
  20.     EXT_convolution is affected by this specification.
  21.     SGI_color_table is affected by this specification.
  22.     
  23. Overview
  24.  
  25.     The association of the current context with a drawable is extended to allow
  26.     separate write and read drawables.
  27.  
  28. New Procedures and Functions
  29.  
  30.     Bool glXMakeCurrentReadSGI(Display* dpy,
  31.                    GLXDrawable draw,
  32.                    GLXDrawable read,
  33.                    GLXContext ctx);
  34.  
  35.     GLXDrawable glXGetCurrentReadDrawableSGI(void);
  36.  
  37. New Tokens
  38.  
  39.     None
  40.  
  41. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  42.  
  43.     None
  44.  
  45. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  46.  
  47.     None
  48.  
  49. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  50. and the Frame buffer)
  51.  
  52.     If glXMakeCurrentReadSGI is used to associate two glXDrawables with
  53.     the current rendering context, glXDrawable <draw> is used for all
  54.     OpenGL operation except:
  55.  
  56.     1.    Any pixel data that are sourced based on the value of glReadBuffer.
  57.  
  58.     2.    Any depth values that are retrieved by glReadPixels, glCopyPixels,
  59.     or any OpenGL extension that sources depth images from the frame
  60.     buffer in the manner of glReadPixels and glCopyPixels.
  61.  
  62.     3.    Any stencil values that are retrieved by glReadPixels, glCopyPixels,
  63.     or any OpenGL extension that sources stencil images from the frame
  64.     buffer in the manner of glReadPixels and glCopyPixels.
  65.  
  66.     These frame buffer values are taken from glXDrawable <read>.
  67.  
  68.     No error will be generated if the value of READ_BUFFER at the time the
  69.     glXMakeCurrentReadSGI call is made does not correspond to a valid color
  70.     buffer in <read>.  Also, no error due to READ_BUFFER mismatch will be
  71.     generated by subsequent calls to any of the operations enumerated above,
  72.     but the pixels values used will be undefined until READ_BUFFER is set to a
  73.     color buffer that is valid in the <read>.  Operations that query the value
  74.     of READ_BUFFER (i.e., glGet, glPushAttrib) use the value set last in the
  75.     context, independent of whether it is a valid buffer in <read>.
  76.     Subsequent to a glXMakeCurrentRead call, it is possible that the
  77.     READ_BUFFER may be set to a color buffer that is not valid with respect to
  78.     the visual of the context.  The preceding discussion also applies to
  79.     glXMakeCurrent where <read> is replaced by the single drawable parameter
  80.     to the call.
  81.  
  82.     Error conditions set by glDrawBuffer (even when called implicitly via
  83.     glPopAttrib) and by the operations enumerated above are with respect to
  84.     color and ancillary buffers available in <read> (i.e.,
  85.     glReadBuffer(GL_BACK_BUFFER) will generate an error when <read> is single
  86.     buffered, and so will an operation that tries to source stencil images
  87.     when <read> does not have a stencil buffer).
  88.  
  89. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  90.  
  91.     None
  92.  
  93. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  94.  
  95.     None
  96.  
  97. Additions to the GLX Specification
  98.  
  99.     XXX - not complete yet
  100.  
  101.     Notes:
  102.  
  103.     *    glXMakeCurrentReadSGIX associates two GLXDrawables with a single
  104.     GLXContext.  BadMatch is generated if <draw> was not created with
  105.     the same X screen and visual as <ctx>.  BadMatch is also generated
  106.     if <read> was not created with the same X screen as <ctx>.  The
  107.     only requirement for the visual type of <read>, however, is that it
  108.     be an RGBA, as opposed to index, visual.  Its color, depth, stencil,
  109.     and accumulation buffers need not match the resources of <draw>.
  110.  
  111.     *    glXMakeCurrentReadSGI returns True if it succeeds, and False if it
  112.     fails.  It can fail for myriad reasons, including refusal to accept
  113.     a window or a GLXPixmap as the <read> GLXDrawable, and refusal to
  114.     accept as the <read> GLXDrawable or a GLXPbuffer with color, depth,
  115.     stencil, or accumulation storage facilities that differ from those
  116.     of <draw>.  This laxness may not be acceptable in a final
  117.     specification, but it will help allow early implementations to
  118.     be completed.
  119.  
  120.     *    glXGetCurrentReadDrawableSGI returns the name of the GLXDrawable
  121.     currently being used as a pixel query source.  If glXMakeCurrent
  122.     specified the current rendering context, then
  123.     glXGetCurrentReadDrawableSGI returns the drawable specified as
  124.     <draw> by that glXMakeCurrent call.  If glXMakeCurrentReadSGI
  125.     specified the current rendering context, then
  126.     glXGetCurrentReadDrawableSGI returns the drawable specified as
  127.     <read> by that glXMakeCurrentReadSGI call.  If there is no
  128.     current read drawable, None is returned.
  129.     
  130. Dependencies on EXT_copy_texture
  131.  
  132.     Texture image data are sourced from GLXDrawable <read> if the
  133.     current OpenGL rendering context was specified by glXMakeCurrentReadSGIX.
  134.  
  135. Dependencies on EXT_convolution
  136.  
  137.     Convolution image data are sourced from GLXDrawable <read> if the
  138.     current OpenGL rendering context was specified by glXMakeCurrentReadSGIX,
  139.     and the transfer is specified by CopyConvolutionFilter1DEXT or
  140.     CopyConvolutionFilter2DEXT.
  141.  
  142. Dependencies on SGI_color_table
  143.  
  144.     Color table data are sourced from GLXDrawable <read> if the current
  145.     OpenGL rendering context was specified by glXMakeCurrentReadSGIX,
  146.     and the transfer is specified by CopyColorTableSGI.
  147.  
  148. New State
  149.  
  150.     None
  151.  
  152. New Implementation Dependent State
  153.  
  154.     None
  155.