15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGI_make_current_read 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GLX_SGI_make_current_read 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1997/03/20 02:19:19 $ $$ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 42 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci EXT_copy_texture is affected by this specification. 205bd8deadSopenharmony_ci EXT_convolution is affected by this specification. 215bd8deadSopenharmony_ci SGI_color_table is affected by this specification. 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciOverview 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci The association of the current context with a drawable is extended to allow 265bd8deadSopenharmony_ci separate write and read drawables. This paves the way for allowing 275bd8deadSopenharmony_ci preprocessing of image data in an "off screen" window which is then read 285bd8deadSopenharmony_ci into the visible window for final display. Similarly it sets the 295bd8deadSopenharmony_ci frame-work for direct transfer of video to the GL, by treating the video 305bd8deadSopenharmony_ci as a special kind of read drawable (a.k.a, readable). 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciNew Procedures and Functions 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci Bool glXMakeCurrentReadSGI(Display* dpy, 365bd8deadSopenharmony_ci GLXDrawable draw, 375bd8deadSopenharmony_ci GLXDrawable read, 385bd8deadSopenharmony_ci GLXContext ctx); 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci GLXDrawable glXGetCurrentReadDrawableSGI(void); 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciNew Tokens 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci None 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci None 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci None 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 555bd8deadSopenharmony_ciand the Frame buffer) 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci If glXMakeCurrentReadSGI is used to associate two glXDrawables with 585bd8deadSopenharmony_ci the current rendering context, glXDrawable <draw> is used for all 595bd8deadSopenharmony_ci OpenGL operations except: 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci 1. Any pixel data that are sourced based on the value of READ_BUFFER. 625bd8deadSopenharmony_ci Note, that accumulation operations use the value of READ_BUFFER, but 635bd8deadSopenharmony_ci are not allowed when <draw> in not identical to <read>. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci 2. Any depth values that are retrieved by glReadPixels, glCopyPixels, 665bd8deadSopenharmony_ci or any OpenGL extension that sources depth images from the frame 675bd8deadSopenharmony_ci buffer in the manner of glReadPixels and glCopyPixels. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci 3. Any stencil values that are retrieved by glReadPixels, glCopyPixels, 705bd8deadSopenharmony_ci or any OpenGL extension that sources stencil images from the frame 715bd8deadSopenharmony_ci buffer in the manner of glReadPixels and glCopyPixels. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci These frame buffer values are taken from glXDrawable <read>. 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci No error will be generated if the value of READ_BUFFER at the time the 765bd8deadSopenharmony_ci glXMakeCurrentReadSGI call is made does not correspond to a valid color 775bd8deadSopenharmony_ci buffer in <read>. Also, no error due to READ_BUFFER mismatch will be 785bd8deadSopenharmony_ci generated by subsequent calls to any of the operations enumerated above, 795bd8deadSopenharmony_ci but the pixels values used will be undefined until READ_BUFFER is set to a 805bd8deadSopenharmony_ci color buffer that is valid in the <read>. Operations that query the value 815bd8deadSopenharmony_ci of READ_BUFFER (i.e., glGet, glPushAttrib) use the value set last in the 825bd8deadSopenharmony_ci context, independent of whether it is a valid buffer in <read>. 835bd8deadSopenharmony_ci Subsequent to a glXMakeCurrentRead call, it is possible that the 845bd8deadSopenharmony_ci READ_BUFFER may be set to a color buffer that is not valid with respect to 855bd8deadSopenharmony_ci the visual of the context. The preceding discussion also applies to 865bd8deadSopenharmony_ci glXMakeCurrent where <read> is replaced by the single drawable parameter 875bd8deadSopenharmony_ci to the call. 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci Error conditions set by glDrawBuffer (even when called implicitly via 905bd8deadSopenharmony_ci glPopAttrib) and by the operations enumerated above are with respect to 915bd8deadSopenharmony_ci color and ancillary buffers available in <read> (i.e., 925bd8deadSopenharmony_ci glReadBuffer(GL_BACK_BUFFER) will generate an error when <read> is single 935bd8deadSopenharmony_ci buffered, and so will an operation that tries to source stencil images 945bd8deadSopenharmony_ci when <read> does not have a stencil buffer). 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci The following restriction is added to the end of the introductory 975bd8deadSopenharmony_ci paragraph of section 4.2.4 "The Accumulation Buffer": Accumulation 985bd8deadSopenharmony_ci operations are only allowed when the glXDrawbles <write> and <draw> are 995bd8deadSopenharmony_ci identical. 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci The list of error conditions at the end of section 4.2.4 "The Accumulation 1025bd8deadSopenharmony_ci Buffer" is modified to: If there is no accumulation buffer, the GL is in 1035bd8deadSopenharmony_ci color index mode, or if the glXDrawbles <write> and <read> are not 1045bd8deadSopenharmony_ci identical then Accum generates the error INVALID_OPERATION. 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci None 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci None 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ciAdditions to the GLX Specification 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci XXX - not complete yet 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci Notes: 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci * glXMakeCurrentReadSGIX associates two GLXDrawables with a single 1215bd8deadSopenharmony_ci GLXContext. BadMatch is generated if <draw> was not created with 1225bd8deadSopenharmony_ci the same X screen and visual as <ctx>. BadMatch is also generated 1235bd8deadSopenharmony_ci if <read> was not created with the same X screen as <ctx>. The color, 1245bd8deadSopenharmony_ci depth, stencil, and accumulation buffers of <read> need not match the 1255bd8deadSopenharmony_ci resources of <draw>. 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci * glXMakeCurrentReadSGI returns True if it succeeds, and False if it 1285bd8deadSopenharmony_ci fails. It can fail for myriad reasons, including refusal to accept 1295bd8deadSopenharmony_ci a window or a GLXPixmap as the <read> GLXDrawable, and refusal to 1305bd8deadSopenharmony_ci accept as the <read> a GLXDrawable or a GLXPbuffer with color, depth, 1315bd8deadSopenharmony_ci stencil, or accumulation storage facilities that differ from those 1325bd8deadSopenharmony_ci of <draw>. This laxness may not be acceptable in a final 1335bd8deadSopenharmony_ci specification, but it will help allow early implementations to 1345bd8deadSopenharmony_ci be completed. 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci * glXMakeCurrentReadSGI may return False if <draw> and <read> cannot 1375bd8deadSopenharmony_ci exist in framebuffer memory simultaneously. 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci * glXGetCurrentReadDrawableSGI returns the name of the GLXDrawable 1405bd8deadSopenharmony_ci currently being used as a pixel query source. If glXMakeCurrent 1415bd8deadSopenharmony_ci specified the current rendering context, then 1425bd8deadSopenharmony_ci glXGetCurrentReadDrawableSGI returns the drawable specified as 1435bd8deadSopenharmony_ci <draw> by that glXMakeCurrent call. If glXMakeCurrentReadSGI 1445bd8deadSopenharmony_ci specified the current rendering context, then 1455bd8deadSopenharmony_ci glXGetCurrentReadDrawableSGI returns the drawable specified as 1465bd8deadSopenharmony_ci <read> by that glXMakeCurrentReadSGI call. If there is no 1475bd8deadSopenharmony_ci current read drawable, None is returned. 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ciGLX Protocol 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci One new GLX protocol command is added. 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci MakeCurrentRead 1545bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 1555bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 1565bd8deadSopenharmony_ci 2 6 request length 1575bd8deadSopenharmony_ci 4 65537 vendor specific opcode 1585bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG old context tag 1595bd8deadSopenharmony_ci 4 GLX_DRAWABLE drawable 1605bd8deadSopenharmony_ci 4 GLX_DRAWABLE read drawable 1615bd8deadSopenharmony_ci 4 GLX_CONTEXT context id 1625bd8deadSopenharmony_ci => 1635bd8deadSopenharmony_ci 1 1 Reply 1645bd8deadSopenharmony_ci 1 unused 1655bd8deadSopenharmony_ci 2 CARD16 sequence number 1665bd8deadSopenharmony_ci 24 unused 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ciDependencies on EXT_copy_texture 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci Texture image data are sourced from GLXDrawable <read> if the 1715bd8deadSopenharmony_ci current OpenGL rendering context was specified by glXMakeCurrentReadSGIX. 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ciDependencies on EXT_convolution 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci Convolution image data are sourced from GLXDrawable <read> if the 1765bd8deadSopenharmony_ci current OpenGL rendering context was specified by glXMakeCurrentReadSGIX, 1775bd8deadSopenharmony_ci and the transfer is specified by CopyConvolutionFilter1DEXT or 1785bd8deadSopenharmony_ci CopyConvolutionFilter2DEXT. 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ciDependencies on SGI_color_table 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci Color table data are sourced from GLXDrawable <read> if the current 1835bd8deadSopenharmony_ci OpenGL rendering context was specified by glXMakeCurrentReadSGIX, 1845bd8deadSopenharmony_ci and the transfer is specified by CopyColorTableSGI. 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ciNew State 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci None 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ciNew Implementation Dependent State 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci None 193