Queries context information
C bindings library: libGL.a
int glXQueryContext(Display *dpy,
GLXContext ctx,
int attribute,
int *value)
The glXQueryContext subroutine sets the value provided to the attribute value of the specified GLX Context. The glXQueryContext returns an error code if for any reason it is unsuccessful. If it is successful, 0 (zero) is returned.
The attribute parameter can be one of the following:
Attribute | Description |
---|---|
GLX_FBCONFIG_ID | This attribute is the XID of the GLX FBConfig associated with the GLX Context. |
GLX_RENDER_TYPE | This attribute is the type of rendering supported by the GLX Context. |
GLX_SCREEN | This attribute is the number of the screen associated with the GLX Context. |
dpy | Specifies the connection to the X server. |
ctx | Specifies a GLX rendering context. |
attribute | Specifies the GLX Context attribute to be returned. |
value | Returns the requested value. |
GLX_BAD_ATTRIBUTE | Is generated if attribute is not a valid GLX Context attribute. |
GLXBadContext | Is generated if ctx does not refer to a valid context and a round trip to the X server is involved. |
The glXCreateNewContext subroutine.