Creates a new GLX rendering context.
OpenGL C bindings library: libGL.a
GLXContext glXCreateNewContext(Display *dpy
GLXFBConfig config
int renderType
GLXContext ShareList
Bool Direct)
The glXCreateNewContext subroutine creates a GLX rendering context and returns its handle. This context can be used to render into GLX windows, GLX pixmaps and GLX pbuffers. If the glXCreateNewContext subroutine fails to create a rendering context, Null is returned.
If Direct is set to True, a direct rendering context is created if the implementation supports direct rendering and the connection is to a local X server. If Direct is set to False, a rendering context that renders through the X server is created. Direct rendering provides a performance advantage in some implementations. However, direct rendering contexts cannot be shared outside a single process or used to render to GLX pixmaps. If a direct rendering context cannot be created, then an attempt to create an indirect context instead.
If ShareList is not Null, all display-list indexes and definitions are shared by both the ShareList context and 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 exist in the same address space. Two rendering contexts share an address space if both are nondirect and use the same server, or if both are direct and owned by a single process.
If both rendering contexts are nondirect, it is not necessary for the calling threads to share an address space; however, their related rendering contexts must share the address space.
A process is a single execution environment, implemented in a single address space, consisting of one or more threads.
A thread is one of a set of subprocesses that share a single address space, but maintain separate program counters, stack spaces, and other related global data. A thread is the only member of its subprocess group that is equivalent to a process.
Null | Is returned if the glXCreateNewContext subroutine fails to create a rendering context on the client side. |
BadAlloc | Is generated if the server does not have enough resources to allocate the new context. |
BadMatch | Is generated if the context to be created cannot share the address space or the screen of the context specified by ShareList is not available. |
BadValue | Is generated if the renderType parameter specifies an invalid rendering type. |
GLXBadContext | Is generated if ShareList is not a GLX context and is not Null. |
GLXBadFBConfig | Is generated if config is not a valid GLX FBConfig. |
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
/usr/include/GL/glx.h | Contains C language constants, variable type definitions, and ANSI function prototypes for GLX. |
glXDestroyContext subroutine, glXGetFBConfigAttrib subroutine, glXIsDirect subroutine, glXMakeContextCurrent subroutine.
OpenGL in the AIXwindows (GLX) Environment.