summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h67
1 files changed, 6 insertions, 61 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index d4b7597..b10d5da 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -62,6 +62,7 @@
#include "QtCore/qatomic.h"
#include "private/qwidget_p.h"
#include "qcache.h"
+#include "qglpaintdevice_p.h"
#ifndef QT_OPENGL_ES_1_CL
#define q_vertexType float
@@ -174,6 +175,7 @@ class QGLWidgetPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QGLWidget)
public:
QGLWidgetPrivate() : QWidgetPrivate()
+ , disable_clear_on_painter_begin(false)
#ifdef Q_WS_QWS
, wsurf(0)
#endif
@@ -190,11 +192,14 @@ public:
void cleanupColormaps();
QGLContext *glcx;
+ QGLWidgetGLPaintDevice glDevice;
bool autoSwap;
QGLColormap cmap;
QMap<QString, int> displayListCache;
+ bool disable_clear_on_painter_begin;
+
#if defined(Q_WS_WIN)
void updateColormap();
QGLContext *olcx;
@@ -293,7 +298,6 @@ public:
uint sharing : 1;
uint initDone : 1;
uint crWin : 1;
- uint clear_on_painter_begin : 1;
uint internal_context : 1;
uint version_flags_cached : 1;
QPaintDevice *paintDevice;
@@ -337,57 +341,6 @@ Q_SIGNALS:
void aboutToDestroyContext(const QGLContext *context);
};
-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,
- QGLContext::BindOptions = QGLContext::InternalBindOption);
- GLuint bindTexture(const QPixmap &pixmap, GLenum target = GL_TEXTURE_2D, GLint format = GL_RGBA,
- QGLContext::BindOptions = QGLContext::InternalBindOption);
- 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;
-};
-
// GL extension definitions
class QGLExtensions {
public:
@@ -519,15 +472,7 @@ extern QPaintEngine* qt_qgl_paint_engine();
extern EGLDisplay qt_qgl_egl_display();
#endif
-inline bool qt_gl_preferGL2Engine()
-{
-#if defined(QT_OPENGL_ES_2)
- return true;
-#else
- return (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_2_0)
- && qgetenv("QT_GL_USE_OPENGL1ENGINE").isEmpty();
-#endif
-}
+bool qt_gl_preferGL2Engine();
inline GLenum qt_gl_preferredTextureFormat()
{