summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpaintdevice_p.h
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-09-08 16:03:00 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-08 16:36:17 (GMT)
commitf6f099e33773e5739ef89681bc97a1a91ff168c8 (patch)
treea5278ef2151debe525b23700e04dd2f3cfd3b0c6 /src/opengl/qglpaintdevice_p.h
parent31d8058a32a1d2d2d6bc1ba3d48f5a382d7b87a7 (diff)
downloadQt-f6f099e33773e5739ef89681bc97a1a91ff168c8.zip
Qt-f6f099e33773e5739ef89681bc97a1a91ff168c8.tar.gz
Qt-f6f099e33773e5739ef89681bc97a1a91ff168c8.tar.bz2
Cleanup of QGLPaintDevice before it goes in
This is the last patch in the QGLPaintDevice series. Although previous patches have not been reviewed individually, Samuel's reviewed QGLPaintDevice API and all the changes as the code stands with this patch. Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/qglpaintdevice_p.h')
-rw-r--r--src/opengl/qglpaintdevice_p.h100
1 files changed, 18 insertions, 82 deletions
diff --git a/src/opengl/qglpaintdevice_p.h b/src/opengl/qglpaintdevice_p.h
index a175b8c..32a1275 100644
--- a/src/opengl/qglpaintdevice_p.h
+++ b/src/opengl/qglpaintdevice_p.h
@@ -9,8 +9,8 @@
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
+** contained in the Technology Preview License Agreement accompanying
+** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -21,20 +21,20 @@
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
** package.
**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at http://qt.nokia.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -53,9 +53,13 @@
// We mean it.
//
+
#include <qpaintdevice.h>
#include <qgl.h>
+
+QT_BEGIN_NAMESPACE
+
class QGLPaintDevice : public QPaintDevice
{
public:
@@ -68,12 +72,6 @@ public:
virtual void ensureActiveTarget();
virtual void endPaint();
-// virtual void clearOnBegin() const;
-// virtual QColor clearColor() const;
-// virtual QColor backgroundColor() const;
-// virtual bool autoFillBackground() const;
-// virtual bool hasTransparentBackground() const;
-
virtual QGLContext* context() const = 0;
QGLFormat format() const;
virtual QSize size() const = 0;
@@ -82,12 +80,8 @@ public:
static QGLPaintDevice* getDevice(QPaintDevice*);
protected:
- // Inline?
-// void setContext(QGLContext* c);
GLuint m_previousFBO;
GLuint m_thisFBO;
-private:
-// QGLContext* m_context;
};
@@ -100,11 +94,6 @@ public:
virtual QPaintEngine* paintEngine() const;
-// virtual void clearOnBegin() const;
-// virtual QColor clearColor() const;
-// virtual bool autoFillBackground() const;
-// virtual bool hasTransparentBackground() const;
-
// QGLWidgets need to do swapBufers in endPaint:
virtual void beginPaint();
virtual void endPaint();
@@ -118,59 +107,6 @@ private:
QGLWidget *glWidget;
};
-
-
-/*
-Replaces:
-
-class QGLPixelBuffer;
-class QGLFramebufferObject;
-class QWSGLWindowSurface;
-class QGLWindowSurface;
-class QGLPixmapData;
-class QGLDrawable {
-public:
- QGLDrawable() : widget(0), buffer(0), fbo(0)
-#if defined(Q_WS_QWS) || (!defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL))
- , wsurf(0)
-#endif
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
- , pixmapData(0)
-#endif
- {}
- void setDevice(QPaintDevice *pdev);
- void swapBuffers();
- void makeCurrent();
- void doneCurrent();
- QSize size() const;
- QGLFormat format() const;
- GLuint bindTexture(const QImage &image, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA);
- GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA);
- QColor backgroundColor() const;
- QGLContext *context() const;
- bool autoFillBackground() const;
- bool hasTransparentBackground() const;
-
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
- QGLPixmapData *copyOnBegin() const;
-#endif
-
-private:
- bool wasBound;
- QGLWidget *widget;
- QGLPixelBuffer *buffer;
- QGLFramebufferObject *fbo;
-#ifdef Q_WS_QWS
- QWSGLWindowSurface *wsurf;
-#elif !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
- QGLWindowSurface *wsurf;
-#endif
-
-#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
- QGLPixmapData *pixmapData;
-#endif
- int previous_fbo;
-};
-*/
+QT_END_NAMESPACE
#endif // QGLPAINTDEVICE_P_H