15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci        EXT_import_context
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci        GLX_EXT_import_context
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci        Version 3, May 20, 2015
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci        47
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci        This extension affects the definition of SGIX_FBConfig.
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciOverview
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci        This extension allows multiple X clients to share an indirect
245bd8deadSopenharmony_ci        rendering context.
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ci        Additional convenience procedures to get the current Display*
275bd8deadSopenharmony_ci        bound to a context as well as other context information are
285bd8deadSopenharmony_ci        also added.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ciIssues
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci        Does glXImportGLXContext also need to take an XVisualInfo*?
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci        No.  This information will be retrieved from the server.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciNew Procedures and Functions
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci        Display *glXGetCurrentDisplayEXT();
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci        int glXQueryContextInfoEXT(Display *dpy, GLXContext context,
415bd8deadSopenharmony_ci                                        int attribute,int *value);
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci        GLXContextID glXGetContextIDEXT(const GLXContext context);
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci        GLXContext glXImportContextEXT(Display *dpy, GLXContextID contextID);
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci        void glXFreeContextEXT(Display *dpy, GLXContext context);
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciNew Tokens
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci        Accepted by the <attribute> parameter of glXQueryContextInfoEXT:
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci            GLX_SHARE_CONTEXT_EXT               0x800A
545bd8deadSopenharmony_ci            GLX_VISUAL_ID_EXT                   0x800B
555bd8deadSopenharmony_ci            GLX_SCREEN_EXT                      0x800C
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci        None
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization)
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci        None
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
665bd8deadSopenharmony_ciand the Frame Buffer)
675bd8deadSopenharmony_ci
685bd8deadSopenharmony_ci        None
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions)
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci        None
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests)
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci        None
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ciAdditions to the GLX Specification
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci        [Add the following to Section 3.2.4 of the GLX Specification
815bd8deadSopenharmony_ci        (Rendering Contexts)]
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci        To get the display associated with the current context, use
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci            Display *glXGetCurrentDisplayEXT();
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci        If there is no current context, NULL is returned. No round trip
885bd8deadSopenharmony_ci        is forced to the server; unlike most X calls that return a value,
895bd8deadSopenharmony_ci        glXGetCurrentDisplayEXT does not flush any pending events.
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci        To obtain the value of a context's attribute, use
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci            int glXQueryContextInfoEXT(Display *dpy, GLXContext context,
945bd8deadSopenharmony_ci                                       int attribute, int *value);
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci        glxQueryContextInfoEXT returns through <value> the value of
975bd8deadSopenharmony_ci        <attribute> for <context>.  It may cause a round trip to the
985bd8deadSopenharmony_ci        server.
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci        The values and types corresponding to each GLX context attribute
1015bd8deadSopenharmony_ci        are listed in the table below.
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci        GLX context attribute   type    context information
1045bd8deadSopenharmony_ci        ---------------------   ----    -------------------
1055bd8deadSopenharmony_ci        GLX_SHARE_CONTEXT_EXT   XID     xid of the share list context
1065bd8deadSopenharmony_ci        GLX_VISUAL_ID_EXT       XID     visual id
1075bd8deadSopenharmony_ci        GLX_SCREEN_EXT          int     screen number
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci        glxQueryContextInfoEXT returns GLX_BAD_ATTRIBUTE if <attribute>
1105bd8deadSopenharmony_ci        is not a valid GLX context attribute or GLX_BAD_CONTEXT if <context>
1115bd8deadSopenharmony_ci        is invalid, otherwise it returns Success.
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci        To obtain the XID of a GLXContext, use
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ci            GLXContextID glXGetContextIDEXT(const GLXContext context);
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci        No round trip is forced to the server; unlike most X calls that
1185bd8deadSopenharmony_ci        return a value, glXGetContextIDEXT does not flush any pending
1195bd8deadSopenharmony_ci        events. If <context> is NULL, None is returned. If <context> is not
1205bd8deadSopenharmony_ci        NULL and is not a valid GLXContext name, behavior is undefined.
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci        To create a GLXContext given the XID of an existing GLXContext, use
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci            GLXContext glXImportContextEXT(Display *dpy,
1255bd8deadSopenharmony_ci                                           GLXContextID contextID);
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci        glXImportContextEXT may be used in place of glXCreateContext to
1285bd8deadSopenharmony_ci        share another process's indirect rendering context.
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ci        Only the server-side context information can be shared between
1315bd8deadSopenharmony_ci        X clients; client-side state, such as pixel storage modes,
1325bd8deadSopenharmony_ci        cannot be shared. Thus, glXImportContextEXT, must allocate
1335bd8deadSopenharmony_ci        memory to store client-side information. This memory is freed
1345bd8deadSopenharmony_ci        by calling  glXFreeContextEXT.
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci        This call does not create a new XID.  It merely makes an
1375bd8deadSopenharmony_ci        existing object available to the importing client (Display *).
1385bd8deadSopenharmony_ci        Like any XID, it goes away when the creating client drops its
1395bd8deadSopenharmony_ci        connection or the ID is explicitly deleted. Note that this is
1405bd8deadSopenharmony_ci        when the XID goes away. The object goes away when the XID
1415bd8deadSopenharmony_ci        goes away AND the context is not current to any thread.
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci        If <contextID> does not refer to a valid context, then
1445bd8deadSopenharmony_ci        a BadContext error is generated; if <contextID> refers to
1455bd8deadSopenharmony_ci        direct rendering context then no error is generated but
1465bd8deadSopenharmony_ci        glXImportContextEXT returns NULL.
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci        To free the client-side part of a GLXContext that was created
1495bd8deadSopenharmony_ci        with glXImportContext, use
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci            void glXFreeContextEXT(Display *dpy, GLXContext context);
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci        glXFreeContext does not free the server-side context information
1545bd8deadSopenharmony_ci        or the XID associated with the server-side context.
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci        [Add the following clarification to glXMakeCurrent]
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci        Change:
1595bd8deadSopenharmony_ci           If <context> is current to some other thread, then glXMakeCurrent
1605bd8deadSopenharmony_ci           will generate a BadAccess error.
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci        To:
1635bd8deadSopenharmony_ci           If <context> is current to some other thread or process, then
1645bd8deadSopenharmony_ci           glXMakeCurrent will generate a BadAccess error.
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ciGLX Protocol
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci        One new GLX protocol command is added.
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci        QueryContextInfo
1715bd8deadSopenharmony_ci            1           CARD8           opcode (X assigned)
1725bd8deadSopenharmony_ci            1           17              GLX opcode (glXVendorPrivateWithReply)
1735bd8deadSopenharmony_ci            2           4               request length
1745bd8deadSopenharmony_ci            4           1024            vendor specific opcode
1755bd8deadSopenharmony_ci            4           unused          corresponds to context tag in header
1765bd8deadSopenharmony_ci            4           GLX_CONTEXT     context id
1775bd8deadSopenharmony_ci           =>
1785bd8deadSopenharmony_ci            1           1               Reply
1795bd8deadSopenharmony_ci            1                           unused
1805bd8deadSopenharmony_ci            2           CARD16          sequence number
1815bd8deadSopenharmony_ci            4           2*n             reply length
1825bd8deadSopenharmony_ci            4           CARD32          n
1835bd8deadSopenharmony_ci            20                          unused
1845bd8deadSopenharmony_ci            8*n         LISTofCARD32    attribute, value pairs
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ciErrors
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci        None
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ciNew State
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci        None
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ciNew Implementation Dependent State
1955bd8deadSopenharmony_ci
1965bd8deadSopenharmony_ci        None
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ciRevision History
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci    Version 3, 2015/05/20 - Specify behavior of glXGetContextIDEXT when an
2015bd8deadSopenharmony_ci    invalid <context> is passed (Bug 8344).
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ci    Version 2, 2006/08/24 - Fixed opcode for QueryContextInfo per Ian
2045bd8deadSopenharmony_ci    Romanick (opcode is 1024 per glx.spec, which is used to generate
2055bd8deadSopenharmony_ci    glxproto.h - not 15 as has been in the extension spec since 1995).
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci    Version 1.14, 1995/10/14 - Last update from SGI.
2085bd8deadSopenharmony_ci
209