summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-08-22 10:49:28 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-08-29 10:25:24 +0200
commit6e28e8441b698c3397c2c78125c877f2e9867cb1 (patch)
tree1e3ad0e43cb775854835817cd04bdc8b5e047e15 /src/plugins/platforms/xcb
parentaaa4a26f82f99fa8724841eba91bad029306e0ce (diff)
Copy core GL functionality to QtGui with QGL -> QOpenGL naming.
Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qdri2context.cpp4
-rw-r--r--src/plugins/platforms/xcb/qdri2context.h4
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp6
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.h6
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h4
8 files changed, 20 insertions, 20 deletions
diff --git a/src/plugins/platforms/xcb/qdri2context.cpp b/src/plugins/platforms/xcb/qdri2context.cpp
index 8eef1b6111..5f4aff5455 100644
--- a/src/plugins/platforms/xcb/qdri2context.cpp
+++ b/src/plugins/platforms/xcb/qdri2context.cpp
@@ -134,9 +134,9 @@ QDri2Context::QDri2Context(QXcbWindow *window)
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERER,d->depth);
//restore the old current context
- const QPlatformGLContext *currentContext = QPlatformGLContext::currentContext();
+ const QPlatformOpenGLContext *currentContext = QPlatformOpenGLContext::currentContext();
if (currentContext)
- const_cast<QPlatformGLContext*>(currentContext)->makeCurrent();
+ const_cast<QPlatformOpenGLContext*>(currentContext)->makeCurrent();
}
QDri2Context::~QDri2Context()
diff --git a/src/plugins/platforms/xcb/qdri2context.h b/src/plugins/platforms/xcb/qdri2context.h
index be7d637643..ec8b251c3f 100644
--- a/src/plugins/platforms/xcb/qdri2context.h
+++ b/src/plugins/platforms/xcb/qdri2context.h
@@ -42,14 +42,14 @@
#ifndef QDRI2CONTEXT_H
#define QDRI2CONTEXT_H
-#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformOpenGLContext>
class QXcbWindow;
class QDri2ContextPrivate;
struct xcb_dri2_dri2_buffer_t;
-class QDri2Context : public QPlatformGLContext
+class QDri2Context : public QPlatformOpenGLContext
{
Q_DECLARE_PRIVATE(QDri2Context);
public:
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index c35350a288..bf58721d38 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -50,7 +50,7 @@
#include <X11/Xutil.h>
#include <GL/glx.h>
-#include <QtGui/QGuiGLContext>
+#include <QtGui/QOpenGLContext>
#include "qglxintegration.h"
#include <QtPlatformSupport/private/qglxconvenience_p.h>
@@ -59,8 +59,8 @@
#include <dlfcn.h>
#endif
-QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlatformGLContext *share)
- : QPlatformGLContext()
+QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
+ : QPlatformOpenGLContext()
, m_screen(screen)
, m_context(0)
{
diff --git a/src/plugins/platforms/xcb/qglxintegration.h b/src/plugins/platforms/xcb/qglxintegration.h
index b431a45741..bbe67b653a 100644
--- a/src/plugins/platforms/xcb/qglxintegration.h
+++ b/src/plugins/platforms/xcb/qglxintegration.h
@@ -45,17 +45,17 @@
#include "qxcbwindow.h"
#include "qxcbscreen.h"
-#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformOpenGLContext>
#include <QtGui/QSurfaceFormat>
#include <QtCore/QMutex>
#include <GL/glx.h>
-class QGLXContext : public QPlatformGLContext
+class QGLXContext : public QPlatformOpenGLContext
{
public:
- QGLXContext(QXcbScreen *xd, const QSurfaceFormat &format, QPlatformGLContext *share);
+ QGLXContext(QXcbScreen *xd, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
~QGLXContext();
bool makeCurrent(QPlatformSurface *surface);
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 54394c9193..41650efcdb 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -73,7 +73,7 @@
#include <QtPlatformSupport/private/qeglplatformcontext_p.h>
#endif
-#include <QtGui/QGuiGLContext>
+#include <QtGui/QOpenGLContext>
#include <QtGui/QScreen>
QXcbIntegration::QXcbIntegration(const QStringList &parameters)
@@ -125,7 +125,7 @@ QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
class QEGLXcbPlatformContext : public QEGLPlatformContext
{
public:
- QEGLXcbPlatformContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share, EGLDisplay display)
+ QEGLXcbPlatformContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share, EGLDisplay display)
: QEGLPlatformContext(glFormat, share, display)
{
}
@@ -137,7 +137,7 @@ public:
};
#endif
-QPlatformGLContext *QXcbIntegration::createPlatformGLContext(QGuiGLContext *context) const
+QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle());
#if defined(XCB_USE_GLX)
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 9d49a90d0a..cad127c28e 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -57,7 +57,7 @@ public:
~QXcbIntegration();
QPlatformWindow *createPlatformWindow(QWindow *window) const;
- QPlatformGLContext *createPlatformGLContext(QGuiGLContext *context) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
bool hasCapability(Capability cap) const;
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
index 217dae6bc1..3c9cdfd257 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp
@@ -48,7 +48,7 @@
#include <QtCore/QDebug>
-#include <QtGui/qguiglcontext_qpa.h>
+#include <QtGui/qopenglcontext.h>
#include <QtGui/qscreen.h>
#if defined(XCB_USE_EGL)
@@ -74,7 +74,7 @@ public:
Q_GLOBAL_STATIC(QXcbResourceMap, qXcbResourceMap)
-void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QGuiGLContext *context)
+void *QXcbNativeInterface::nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context)
{
QByteArray lowerCaseResource = resourceString.toLower();
ResourceType resource = qXcbResourceMap()->value(lowerCaseResource);
@@ -174,7 +174,7 @@ void *QXcbNativeInterface::graphicsDeviceForWindow(QWindow *window)
}
-void * QXcbNativeInterface::eglContextForContext(QGuiGLContext *context)
+void * QXcbNativeInterface::eglContextForContext(QOpenGLContext *context)
{
Q_ASSERT(context);
#if defined(XCB_USE_EGL)
@@ -183,7 +183,7 @@ void * QXcbNativeInterface::eglContextForContext(QGuiGLContext *context)
#endif
#if 0
Q_ASSERT(window);
- QPlatformGLContext *platformContext = window->glContext()->handle();
+ QPlatformOpenGLContext *platformContext = window->glContext()->handle();
if (!platformContext) {
qDebug() << "QWindow" << window << "does not have a glContext"
<< "cannot return EGLContext";
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index e9b1df4511..8dec83267a 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -59,7 +59,7 @@ public:
EglContext
};
- void *nativeResourceForContext(const QByteArray &resourceString, QGuiGLContext *context);
+ void *nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context);
void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window);
void *displayForWindow(QWindow *window);
@@ -68,7 +68,7 @@ public:
void *screenForWindow(QWindow *window);
void *graphicsDeviceForWindow(QWindow *window);
- void *eglContextForContext(QGuiGLContext *context);
+ void *eglContextForContext(QOpenGLContext *context);
private:
static QXcbScreen *qPlatformScreenForWindow(QWindow *window);