diff options
Diffstat (limited to 'src/plugins/platforms/xcb/qglxintegration.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qglxintegration.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index 1417157bdf..7c0751f896 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -50,6 +50,8 @@ #include <X11/Xutil.h> #include <GL/glx.h> +#include <QtGui/QWindowContext> + #include "qglxintegration.h" #include "qglxconvenience.h" @@ -57,18 +59,17 @@ #include <dlfcn.h> #endif -QGLXContext::QGLXContext(Window window, QXcbScreen *screen, const QPlatformWindowFormat &format) +QGLXContext::QGLXContext(Window window, QXcbScreen *screen, const QWindowFormat &format) : QPlatformGLContext() , m_screen(screen) , m_drawable((Drawable)window) , m_context(0) { Q_XCB_NOOP(m_screen->connection()); - const QPlatformGLContext *sharePlatformContext; - sharePlatformContext = format.sharedGLContext(); + const QWindowContext *shareContext = format.sharedContext(); GLXContext shareGlxContext = 0; - if (sharePlatformContext) - shareGlxContext = static_cast<const QGLXContext*>(sharePlatformContext)->glxContext(); + if (shareContext) + shareGlxContext = static_cast<const QGLXContext*>(shareContext->handle())->glxContext(); GLXFBConfig config = qglx_findConfig(DISPLAY_FROM_XCB(screen),screen->screenNumber(),format); m_context = glXCreateNewContext(DISPLAY_FROM_XCB(screen), config, GLX_RGBA_TYPE, shareGlxContext, TRUE); @@ -93,7 +94,6 @@ QGLXContext::~QGLXContext() void QGLXContext::makeCurrent() { Q_XCB_NOOP(m_screen->connection()); - QPlatformGLContext::makeCurrent(); glXMakeCurrent(DISPLAY_FROM_XCB(m_screen), m_drawable, m_context); Q_XCB_NOOP(m_screen->connection()); } @@ -101,7 +101,6 @@ void QGLXContext::makeCurrent() void QGLXContext::doneCurrent() { Q_XCB_NOOP(m_screen->connection()); - QPlatformGLContext::doneCurrent(); glXMakeCurrent(DISPLAY_FROM_XCB(m_screen), 0, 0); Q_XCB_NOOP(m_screen->connection()); } @@ -147,7 +146,7 @@ void* QGLXContext::getProcAddress(const QString& procName) return glXGetProcAddressARB(reinterpret_cast<const GLubyte *>(procName.toLatin1().data())); } -QPlatformWindowFormat QGLXContext::platformWindowFormat() const +QWindowFormat QGLXContext::windowFormat() const { return m_windowFormat; } |