51 #if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2) 56 #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) 65 , m_drawable((Drawable)window)
71 GLXContext shareGlxContext = 0;
72 if (sharePlatformContext)
110 glXMakeCurrent(
m_screen->display()->nativeDisplay(), 0, 0);
120 typedef void *(*qt_glXGetProcAddressARB)(
const GLubyte *);
121 static qt_glXGetProcAddressARB glXGetProcAddressARB = 0;
122 static bool resolved =
false;
124 if (resolved && !glXGetProcAddressARB)
126 if (!glXGetProcAddressARB) {
128 if (glxExt.
contains(
"GLX_ARB_get_proc_address")) {
129 #if defined(Q_OS_LINUX) || defined(Q_OS_BSD4) 130 void *handle = dlopen(NULL, RTLD_LAZY);
132 glXGetProcAddressARB = (qt_glXGetProcAddressARB) dlsym(handle,
"glXGetProcAddressARB");
135 if (!glXGetProcAddressARB)
141 glXGetProcAddressARB = (qt_glXGetProcAddressARB) lib.
resolve(
"glXGetProcAddressARB");
146 if (!glXGetProcAddressARB)
148 return glXGetProcAddressARB(reinterpret_cast<const GLubyte *>(procName.
toLatin1().
data()));
QPlatformWindowFormat platformWindowFormat() const
QWidget has the function qplatformWindowFormat().
#define QT_END_NAMESPACE
This macro expands to.
char * data()
Returns a pointer to the data stored in the byte array.
QPlatformWindowFormat qglx_platformWindowFromGLXFBConfig(Display *display, GLXFBConfig config, GLXContext ctx)
The QByteArray class provides an array of bytes.
virtual void * getProcAddress(const QString &procName)
Reimplement in subclass to native getProcAddr calls.
Display * nativeDisplay() const
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.
Q_CORE_EXPORT void qDebug(const char *,...)
Q_OPENGL_EXPORT const QString qt_gl_library_name()
#define QT_BEGIN_NAMESPACE
This macro expands to.
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.
int xScreenNumber() const
QPlatformWindowFormat m_windowFormat
GLXContext glxContext() const
QXlibDisplay * display() const
#define glXCreateNewContext
The QLibrary class loads shared libraries at runtime.
virtual void swapBuffers()
Reimplement in subclass to native swap buffers calls.