QGLXNativeContext Class
A class encapsulating a GLXContext and related native handles. More...
Header: | #include <QGLXNativeContext> |
Since: | Qt 5.4 |
Public Functions
QGLXNativeContext() | |
QGLXNativeContext(GLXContext ctx, Display * dpy = 0, Window wnd = 0, VisualID vid = 0) | |
GLXContext | context() const |
Display * | display() const |
VisualID | visualId() const |
Window | window() const |
Detailed Description
A class encapsulating a GLXContext and related native handles.
Note: Only context() is guaranteed to be valid. The other handles may be all 0
. They are useful however when QOpenGLContext::setNativeHandle() is used to adopt a legacy context created by glXCreateContext. To adopt such a context, either the Window or VisualID that had been used to create the context needs to be known, otherwise the adoption will fail. For modern contexts created with an FBConfig, these are not necessary, the GLXContext itself is sufficient. The Display is optional.
Note: There is no binary compatibility guarantee for this class, meaning that an application using it is only guaranteed to work with the Qt version it was developed against.
See also QOpenGLContext::setNativeHandle() and QOpenGLContext::nativeHandle().
Member Function Documentation
QGLXNativeContext::QGLXNativeContext()
Construct a new instance with no handles.
QGLXNativeContext::QGLXNativeContext(GLXContext ctx, Display * dpy = 0, Window wnd = 0, VisualID vid = 0)
Constructs a new instance with the provided ctx, dpy, wnd, vid handles.
GLXContext QGLXNativeContext::context() const
Returns the GLXContext.
Display * QGLXNativeContext::display() const
Returns a pointer to the X11 display or NULL
if not available.
VisualID QGLXNativeContext::visualId() const
Returns the X11 visual ID or 0
if not available.
Window QGLXNativeContext::window() const
Returns the X11 Window or 0
if not available.
© 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.