class QWaylandDisplay;
class QWindow;
-class QPlatformGLContext;
+class QPlatformOpenGLContext;
class QSurfaceFormat;
class QWaylandGLIntegration
virtual void initialize() = 0;
virtual QWaylandWindow *createEglWindow(QWindow *window) = 0;
- virtual QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const = 0;
+ virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
static QWaylandGLIntegration *createGLIntegration(QWaylandDisplay *waylandDisplay);
};
#include "qwaylandshmbackingstore.h"
#include "qwaylandreadbackcglwindow.h"
-#include <QtGui/QGuiGLContext>
+#include <QtGui/QOpenGLContext>
#include <QtCore/QDebug>
#include <OpenGL/OpenGL.h>
#include <QtPlatformSupport/private/cglconvenience_p.h>
-QWaylandReadbackCGLContext::QWaylandReadbackCGLContext(QPlatformGLContext *share)
- : QPlatformGLContext()
+QWaylandReadbackCGLContext::QWaylandReadbackCGLContext(QPlatformOpenGLContext *share)
+ : QPlatformOpenGLContext()
{
Q_UNUSED(share);
m_glContext = qcgl_createGlContext();
{
Q_UNUSED(surface);
- if (QGuiGLContext::currentContext()->handle() != this) {
+ if (QOpenGLContext::currentContext()->handle() != this) {
makeCurrent(surface);
}
CGLFlushDrawable(m_glContext);
#ifndef QWAYLANDREADBACKCGLCONTEXT_H
#define QWAYLANDREADBACKCGLCONTEXT_H
-#include <QPlatformGLContext>
+#include <QPlatformOpenGLContext>
#include "qwaylandreadbackcglintegration.h"
class QWaylandReadbackCGLWindow;
class QWaylandShmBuffer;
-class QWaylandReadbackCGLContext : public QPlatformGLContext
+class QWaylandReadbackCGLContext : public QPlatformOpenGLContext
{
public:
- QWaylandReadbackCGLContext(QPlatformGLContext *share);
+ QWaylandReadbackCGLContext(QPlatformOpenGLContext *share);
QSurfaceFormat format() const;
return new QWaylandReadbackCGLWindow(window,this);
}
-QPlatformGLContext *QWaylandReadbackCGLIntegration::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const
+QPlatformOpenGLContext *QWaylandReadbackCGLIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandReadbackCGLContext(share);
}
void initialize();
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const;
QWaylandDisplay *waylandDisplay() const;
private:
void QWaylandReadbackEglContext::doneCurrent()
{
- QPlatformGLContext::doneCurrent();
+ QPlatformOpenGLContext::doneCurrent();
eglMakeCurrent(mEglIntegration->eglDisplay(),EGL_NO_SURFACE,EGL_NO_SURFACE,EGL_NO_CONTEXT);
}
#ifndef QWAYLANDREADBACKEGLGLCONTEXT_H
#define QWAYLANDREADBACKEGLGLCONTEXT_H
-#include <QPlatformGLContext>
+#include <QPlatformOpenGLContext>
#include "qwaylandreadbackeglintegration.h"
#include "qwaylandreadbackeglwindow.h"
class QWaylandShmBuffer;
-class QWaylandReadbackEglContext : public QPlatformGLContext
+class QWaylandReadbackEglContext : public QPlatformOpenGLContext
{
public:
QWaylandReadbackEglContext(QWaylandReadbackEglIntegration *eglIntegration, QWaylandReadbackEglWindow *window);
return new QWaylandReadbackEglWindow(window, this);
}
-QPlatformGLContext *QWaylandReadbackEglWindow::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const
+QPlatformOpenGLContext *QWaylandReadbackEglWindow::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandReadbackEglContext(glFormat, share, this);
}
void initialize();
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const;
QWaylandDisplay *waylandDisplay() const;
Display *xDisplay() const;
return QWaylandWindow::Egl;
}
-QPlatformGLContext *QWaylandReadbackEglWindow::glContext() const
+QPlatformOpenGLContext *QWaylandReadbackEglWindow::glContext() const
{
if (!mContext) {
QWaylandReadbackEglWindow *that = const_cast<QWaylandReadbackEglWindow *>(this);
WindowType windowType() const;
- QPlatformGLContext *glContext() const;
+ QPlatformOpenGLContext *glContext() const;
void setGeometry(const QRect &rect);
#include "qwaylandshmbackingstore.h"
#include "qwaylandreadbackglxwindow.h"
-#include <QtGui/QGuiGLContext>
+#include <QtGui/QOpenGLContext>
#include <QtCore/QDebug>
static inline void qgl_byteSwapImage(QImage &img, GLenum pixel_type)
}
QWaylandReadbackGlxContext::QWaylandReadbackGlxContext(const QSurfaceFormat &format,
- QPlatformGLContext *share, Display *display, int screen)
+ QPlatformOpenGLContext *share, Display *display, int screen)
: m_display(display)
{
GLXFBConfig config = qglx_findConfig(display, screen, format, GLX_PIXMAP_BIT);
void QWaylandReadbackGlxContext::swapBuffers(QPlatformSurface *surface)
{
- // #### makeCurrent() directly on the platform context doesn't update QGuiGLContext::currentContext()
- if (QGuiGLContext::currentContext()->handle() != this)
+ // #### makeCurrent() directly on the platform context doesn't update QOpenGLContext::currentContext()
+ if (QOpenGLContext::currentContext()->handle() != this)
makeCurrent(surface);
QWaylandReadbackGlxWindow *w = static_cast<QWaylandReadbackGlxWindow *>(surface);
#ifndef QWAYLANDREADBACKGLXCONTEXT_H
#define QWAYLANDREADBACKGLXCONTEXT_H
-#include <QPlatformGLContext>
+#include <QPlatformOpenGLContext>
#include <QSurfaceFormat>
#include "qwaylandreadbackglxintegration.h"
class QWaylandReadbackGlxWindow;
class QWaylandShmBuffer;
-class QWaylandReadbackGlxContext : public QPlatformGLContext
+class QWaylandReadbackGlxContext : public QPlatformOpenGLContext
{
public:
- QWaylandReadbackGlxContext(const QSurfaceFormat &format, QPlatformGLContext *share, Display *display, int screen);
+ QWaylandReadbackGlxContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen);
QSurfaceFormat format() const;
return new QWaylandReadbackGlxWindow(window,this);
}
-QPlatformGLContext *QWaylandReadbackGlxIntegration::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const
+QPlatformOpenGLContext *QWaylandReadbackGlxIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandReadbackGlxContext(glFormat, share, mDisplay, mScreen);
}
void initialize();
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const;
QWaylandDisplay *waylandDisplay() const;
return new QWaylandEglWindow(window);
}
-QPlatformGLContext *QWaylandEglIntegration::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const
+QPlatformOpenGLContext *QWaylandEglIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandGLContext(m_eglDisplay, glFormat, share);
}
void initialize();
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const;
EGLDisplay eglDisplay() const;
#include <QtPlatformSupport/private/qeglconvenience_p.h>
-#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformOpenGLContext>
#include <QtGui/QSurfaceFormat>
#include <QtCore/QMutex>
-QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformGLContext *share)
- : QPlatformGLContext()
+QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
+ : QPlatformOpenGLContext()
, m_eglDisplay(eglDisplay)
, m_config(q_configFromGLFormat(m_eglDisplay, format, true))
, m_format(q_glFormatFromConfig(m_eglDisplay, m_config))
#include "qwaylanddisplay.h"
-#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformOpenGLContext>
#include "qwaylandeglinclude.h"
class QWaylandWindow;
class QWaylandGLWindowSurface;
-class QWaylandGLContext : public QPlatformGLContext {
+class QWaylandGLContext : public QPlatformOpenGLContext {
public:
- QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformGLContext *share);
+ QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
~QWaylandGLContext();
void swapBuffers(QPlatformSurface *surface);
#include <QtPlatformSupport/private/qeglconvenience_p.h>
-QWaylandXCompositeEGLContext::QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformGLContext *share, EGLDisplay display)
+QWaylandXCompositeEGLContext::QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
: QEGLPlatformContext(format, share, display)
{
}
#ifndef QWAYLANDXCOMPOSITEEGLCONTEXT_H
#define QWAYLANDXCOMPOSITEEGLCONTEXT_H
-#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformOpenGLContext>
#include "qwaylandxcompositeeglintegration.h"
class QWaylandXCompositeEGLContext : public QEGLPlatformContext
{
public:
- QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformGLContext *share, EGLDisplay display);
+ QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display);
void swapBuffers(QPlatformSurface *surface);
return new QWaylandXCompositeEGLWindow(window,this);
}
-QPlatformGLContext *QWaylandXCompositeEGLIntegration::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const
+QPlatformOpenGLContext *QWaylandXCompositeEGLIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandXCompositeEGLContext(glFormat, share, eglDisplay());
}
#include <QtCore/QVariant>
#include <QtGui/QWindow>
-#include <QPlatformGLContext>
+#include <QPlatformOpenGLContext>
#include <QWaitCondition>
void initialize();
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const;
QWaylandDisplay *waylandDisplay() const;
struct wl_xcomposite *waylandXComposite() const;
#include <QRegion>
-QWaylandXCompositeGLXContext::QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformGLContext *share, Display *display, int screen)
+QWaylandXCompositeGLXContext::QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen)
: m_display(display)
{
qDebug("creating XComposite-GLX context");
#ifndef QWAYLANDXCOMPOSITEGLXCONTEXT_H
#define QWAYLANDXCOMPOSITEGLXCONTEXT_H
-#include <QtGui/QPlatformGLContext>
+#include <QtGui/QPlatformOpenGLContext>
#include "qwaylandxcompositeglxintegration.h"
#include <QtPlatformSupport/private/qglxconvenience_p.h>
class QWaylandXCompositeGLXWindow;
class QWaylandShmBuffer;
-class QWaylandXCompositeGLXContext : public QPlatformGLContext
+class QWaylandXCompositeGLXContext : public QPlatformOpenGLContext
{
public:
- QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformGLContext *share, Display *display, int screen);
+ QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen);
QSurfaceFormat format() const;
return new QWaylandXCompositeGLXWindow(window, this);
}
-QPlatformGLContext *QWaylandXCompositeGLXIntegration::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const
+QPlatformOpenGLContext *QWaylandXCompositeGLXIntegration::createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const
{
return new QWaylandXCompositeGLXContext(glFormat, share, mDisplay, mScreen);
}
void initialize();
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformGLContext *createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const;
QWaylandDisplay *waylandDisplay() const;
struct wl_xcomposite *waylandXComposite() const;
#include <QtGui/QWindowSystemInterface>
#include <QtGui/QPlatformCursor>
#include <QtGui/QSurfaceFormat>
-#include <QtGui/QGuiGLContext>
+#include <QtGui/QOpenGLContext>
#ifdef QT_WAYLAND_GL_SUPPORT
#include "gl_integration/qwaylandglintegration.h"
return new QWaylandShmWindow(window);
}
-QPlatformGLContext *QWaylandIntegration::createPlatformGLContext(QGuiGLContext *context) const
+QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
#ifdef QT_WAYLAND_GL_SUPPORT
- return mDisplay->eglIntegration()->createPlatformGLContext(context->format(), context->shareHandle());
+ return mDisplay->eglIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
#else
Q_UNUSED(glFormat);
Q_UNUSED(share);
bool hasCapability(QPlatformIntegration::Capability cap) const;
QPlatformWindow *createPlatformWindow(QWindow *window) const;
- QPlatformGLContext *createPlatformGLContext(QGuiGLContext *context) const;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
QAbstractEventDispatcher *guiThreadEventDispatcher() const;