Returns an attribute associated with a GLX drawable.
C bindings library: libGL.a
int glXQueryDrawable(Display * dpy,
GLXDrawable drawable,
intattribute,
unsigned int *value)
The glXQueryDrawable subroutine sets the value provided to the attribute value of the specified GLX drawable.
The attribute parameter can be one of the following:
Attribute | Description |
---|---|
GLX_WIDTH | This attribute is the width of the GLX drawable. |
GLX_HEIGHT | This attribute is the height of the GLX drawable. |
GLX_PRESERVED_CONTENTS | This attribute is a boolean value that shows whether the contents of the GLX pbuffer is to be preserved when a resource conflict occurs. |
GLX_LARGEST_PBUFFER | This attribute is a boolean value that shows whether the largest pbuffer allocation was obtained when the allocation of the pbuffer would have failed. |
GLX_FBCONFIG_ID | This attribute is the XID of the GLX FBConfig used when drawable was created. |
The contents of value will be undefined if drawable is not a GLX pbuffer and attribute is set to GLX_PRESERVED_CONTENTS or GLX_LARGEST_PBUFFER. The contents of value will be 0 (zero) if attribute is not one of the attributes listed above.
dpy | Specifies the connection to the X server. |
drawable | Specifies a GLX drawable ID. |
attribute | Specifies the GLX drawable attribute to be returned. |
value | Returns the requested value. |
GLXBadDrawable | Is generated if drawable does not refer to a valid GLX drawable. |
The glXCreatePbuffer subroutine, glXCreatePixmap subroutine, or glXCreateWindow subroutine.