C SPECIFICATION

       GLXContext glXCreateNewContext( Display *dpy,
                                       GLXFBConfig confi )
       GLXContext glXCreateNewContext( Display *,
                                       GLXFBConfig GLXFBConfig,
                                       int int,
                                       GLXContext GLXContext,
                                       Bool Bool )



PARAMETERS

       Specifies the connection to the X server.

       GLXFBConfig  Specifies  the  GLXFBConfig  structure  with  the  desired
                    attributes for the context.

       int          Specifies  the type of the context to be created.  Must be
                    one of GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.

       GLXContext   Specifies the context with which to share  display  lists.
                    NULL indicates that no sharing is to take place.

       GLXContext   Specifies  whether  rendering  is to be done with a direct
                    connection to the graphics system if  possible  (True)  or
                    through the X server (False).


DESCRIPTION

       glXCreateNewContext  creates  a  GLX  rendering context and returns its
       handle.  This context can be used to render into GLX windows,  pixmaps,
       or  pixel  buffers.  If glXCreateNewContext fails to create a rendering
       context, NULL is returned.

       If int is GLX_RGBA_TYPE, then a context that supports RGBA rendering is
       created.  If GLXFBConfig is GLX_COLOR_INDEX_TYPE, then context support-
       ing color-index rendering is created.

       If int is not NULL, then all display-list indexes and  definitions  are
       shared  by  context int and by the newly created context.  An arbitrary
       number of contexts can share a single display-list space.  However, all
       rendering  contexts  that  share a single display-list space must them-
       selves exist in the same address space.  Two rendering  contexts  share
       an  address  space  if  both are nondirect using the same server, or if
       both are direct and owned by a single process.  Note that in the nondi-
       rect  case,  it  is  not  necessary for the calling threads to share an
       address space, only for their related rendering contexts  to  share  an
       address space.

       If  GLXContext  is  True, then a direct rendering context is created if
       the implementation supports direct rendering, if the connection  is  to
       an  X server that is local, and if a direct rendering context is avail-


ERRORS

       NULL is returned if execution fails on the client side.

       GLXBadContext is generated if int is not a GLX context and is not NULL.

       GLXBadFBConfig  is generated if GLXFBConfig is not a valid GLXFBConfig.

       BadMatch is generated if the context to be created would not share  the
       address space or the screen of the context specified by int.

       BadAlloc  is  generated if the server does not have enough resources to
       allocate the new context.

       BadValue is generated if GLXFBConfig is not a valid visual  (for  exam-
       ple, if a particular GLX implementation does not support it).


SEE ALSO

       glXChooseFBConfig,         glXCreateContext,         glXDestroyContext,
       glXGetFBConfigs,           glXGetFBConfigAttrib,           glXIsDirect,
       glXMakeContextCurrent



                                                       GLXCREATENEWCONTEXT(3G)

Man(1) output converted with man2html