50 #include <X11/Xutil.h> 56 #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) 63 , m_drawable((Drawable)window)
69 GLXContext shareGlxContext = 0;
70 if (sharePlatformContext)
119 typedef void *(*qt_glXGetProcAddressARB)(
const GLubyte *);
120 static qt_glXGetProcAddressARB glXGetProcAddressARB = 0;
121 static bool resolved =
false;
123 if (resolved && !glXGetProcAddressARB)
125 if (!glXGetProcAddressARB) {
127 if (glxExt.
contains(
"GLX_ARB_get_proc_address")) {
128 #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) 129 void *handle = dlopen(NULL, RTLD_LAZY);
131 glXGetProcAddressARB = (qt_glXGetProcAddressARB) dlsym(handle,
"glXGetProcAddressARB");
134 if (!glXGetProcAddressARB)
140 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.
resolve(
"glXGetProcAddressARB");
145 if (!glXGetProcAddressARB)
147 return glXGetProcAddressARB(reinterpret_cast<const GLubyte *>(procName.
toLatin1().
data()));
QPlatformWindowFormat platformWindowFormat() const
QWidget has the function qplatformWindowFormat().
char * data()
Returns a pointer to the data stored in the byte array.
QPlatformWindowFormat qglx_platformWindowFromGLXFBConfig(Display *display, GLXFBConfig config, GLXContext ctx)
#define DISPLAY_FROM_XCB(object)
The QByteArray class provides an array of bytes.
virtual void * getProcAddress(const QString &procName)
Reimplement in subclass to native getProcAddr calls.
virtual void doneCurrent()
Reimplement in subclass to release current context.
QGLXContext(Window window, QXcbScreen *xd, const QPlatformWindowFormat &format)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void * resolve(const char *symbol)
Returns the address of the exported symbol symbol.
The QString class provides a Unicode character string.
QXcbConnection * connection() const
Q_OPENGL_EXPORT const QString qt_gl_library_name()
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
virtual void doneCurrent()
Reimplement in subclass to release current context.
virtual void makeCurrent()
Reimplement in subclass to do makeCurrent on native GL context.
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
virtual void makeCurrent()
Reimplement in subclass to do makeCurrent on native GL context.
GLXFBConfig qglx_findConfig(Display *display, int screen, const QPlatformWindowFormat &format, int drawableBit)
#define TRUE
Synonym for true.
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays...
The QPlatformGLContext class provides an abstraction for native GL contexts.
QPlatformWindowFormat m_windowFormat
GLXContext glxContext() const
#define glXCreateNewContext
The QLibrary class loads shared libraries at runtime.
virtual void swapBuffers()
Reimplement in subclass to native swap buffers calls.