From 176f30b13739b352cbe453cba7796d9a9c808bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 21 Jun 2011 13:39:26 +0200 Subject: OpenGL API refactor. Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of having QPlatformGLSurface accessor in QWindow. --- src/gui/kernel/qplatformwindow_qpa.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/gui/kernel/qplatformwindow_qpa.cpp') diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp index feffd0cfed..b1fdc9734d 100644 --- a/src/gui/kernel/qplatformwindow_qpa.cpp +++ b/src/gui/kernel/qplatformwindow_qpa.cpp @@ -56,7 +56,8 @@ class QPlatformWindowPrivate */ QPlatformWindow::QPlatformWindow(QWindow *window) - : d_ptr(new QPlatformWindowPrivate) + : QPlatformSurface(QSurface::Window) + , d_ptr(new QPlatformWindowPrivate) { Q_D(QPlatformWindow); d->window = window; @@ -87,6 +88,14 @@ QPlatformWindow *QPlatformWindow::parent() const return d->window->parent() ? d->window->parent()->handle() : 0; } +/*! + Returns the actual surface format of the window. +*/ +QSurfaceFormat QPlatformWindow::format() const +{ + return QSurfaceFormat(); +} + /*! This function is called by Qt whenever a window is moved or the window is resized. The resize can happen programatically(from ie. user application) or by the window manager. This means that @@ -209,14 +218,6 @@ void QPlatformWindow::requestActivateWindow() QWindowSystemInterface::handleWindowActivated(window()); } -/*! - Reimplement to create a GL surface for the window. -*/ -QPlatformGLSurface *QPlatformWindow::createGLSurface() const -{ - return 0; -} - bool QPlatformWindow::setKeyboardGrabEnabled(bool grab) { Q_UNUSED(grab); -- cgit v1.2.3