1GLXCREATECONTEXT(3G)             OpenGL Manual            GLXCREATECONTEXT(3G)
2
3
4

NAME

6       glXCreateContext - create a new GLX rendering context
7

C SPECIFICATION

9       GLXContext glXCreateContext(Display * dpy, XVisualInfo * vis,
10                                   GLXContext shareList, Bool direct);
11

PARAMETERS

13       dpy
14           Specifies the connection to the X server.
15
16       vis
17           Specifies the visual that defines the frame buffer resources
18           available to the rendering context. It is a pointer to an
19           XVisualInfo structure, not a visual ID or a pointer to a Visual.
20
21       shareList
22           Specifies the context with which to share display lists.  NULL
23           indicates that no sharing is to take place.
24
25       direct
26           Specifies whether rendering is to be done with a direct connection
27           to the graphics system if possible (True) or through the X server
28           (False).
29

DESCRIPTION

31       glXCreateContext creates a GLX rendering context and returns its
32       handle. This context can be used to render into both windows and GLX
33       pixmaps. If glXCreateContext fails to create a rendering context, NULL
34       is returned.
35
36       If direct is True, then a direct rendering context is created if the
37       implementation supports direct rendering, if the connection is to an X
38       server that is local, and if a direct rendering context is available.
39       (An implementation may return an indirect context when direct is True.)
40       If direct is False, then a rendering context that renders through the X
41       server is always created. Direct rendering provides a performance
42       advantage in some implementations. However, direct rendering contexts
43       cannot be shared outside a single process, and they may be unable to
44       render to GLX pixmaps.
45
46       If shareList is not NULL, then all display-list indexes and definitions
47       are shared by context shareList and by the newly created context. An
48       arbitrary number of contexts can share a single display-list space.
49       However, all rendering contexts that share a single display-list space
50       must themselves exist in the same address space. Two rendering contexts
51       share an address space if both are nondirect using the same server, or
52       if both are direct and owned by a single process. Note that in the
53       nondirect case, it is not necessary for the calling threads to share an
54       address space, only for their related rendering contexts to share an
55       address space.
56
57       If the GL version is 1.1 or greater, then all texture objects except
58       object 0 are shared by any contexts that share display lists.
59

NOTES

61       XVisualInfo is defined in Xutil.h.  It is a structure that includes
62       visual, visualID, screen, and depth elements.
63
64       A process is a single execution environment, implemented in a single
65       address space, consisting of one or more threads.
66
67       A thread is one of a set of subprocesses that share a single address
68       space, but maintain separate program counters, stack spaces, and other
69       related global data. A thread that is the only member of its subprocess
70       group is equivalent to a process.
71
72       It may not be possible to render to a GLX pixmap with a direct
73       rendering context.
74

ERRORS

76       NULL is returned if execution fails on the client side.
77
78       BadMatch is generated if the context to be created would not share the
79       address space or the screen of the context specified by shareList.
80
81       BadValue is generated if vis is not a valid visual (for example, if a
82       particular GLX implementation does not support it).
83
84       GLXBadContext is generated if shareList is not a GLX context and is not
85       NULL.
86
87       BadAlloc is generated if the server does not have enough resources to
88       allocate the new context.
89

SEE ALSO

91       glXDestroyContext(), glXGetConfig(), glXIsDirect(), glXMakeCurrent()
92
94       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
95       under the SGI Free Software B License. For details, see
96       http://oss.sgi.com/projects/FreeB/.
97

AUTHORS

99       opengl.org
100
101
102
103opengl.org                        07/13/2018              GLXCREATECONTEXT(3G)
Impressum