summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
-rw-r--r--src/opengl/qgl.cpp16
-rw-r--r--src/opengl/qglbuffer.cpp4
-rw-r--r--src/opengl/qglbuffer.h4
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
5 files changed, 19 insertions, 14 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index ee49a3d..d3f6a29 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1128,7 +1128,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
d->fill(path);
}
-extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+extern Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2f16b99..0f171e4 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1334,6 +1334,10 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co
\value OpenGL_Version_3_2 OpenGL version 3.2 or higher is present.
+ \value OpenGL_Version_3_3 OpenGL version 3.3 or higher is present.
+
+ \value OpenGL_Version_4_0 OpenGL version 4.0 or higher is present.
+
\value OpenGL_ES_CommonLite_Version_1_0 OpenGL ES version 1.0 Common Lite or higher is present.
\value OpenGL_ES_Common_Version_1_0 OpenGL ES version 1.0 Common or higher is present.
@@ -3725,7 +3729,7 @@ QGLWidget::~QGLWidget()
#endif
delete d->glcx;
d->glcx = 0;
-#if defined(Q_WGL)
+#if defined(Q_WS_WIN)
delete d->olcx;
d->olcx = 0;
#endif
@@ -5044,8 +5048,9 @@ void QGLWidget::deleteTexture(QMacCompatGLuint id)
/*!
\since 4.4
- Calls the corresponding QGLContext::drawTexture() on
- this widget's context.
+ Calls the corresponding QGLContext::drawTexture() with
+ \a target, \a textureId, and \a textureTarget for this
+ widget's context.
*/
void QGLWidget::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget)
{
@@ -5065,8 +5070,9 @@ void QGLWidget::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QM
/*!
\since 4.4
- Calls the corresponding QGLContext::drawTexture() on
- this widget's context.
+ Calls the corresponding QGLContext::drawTexture() with
+ \a point, \a textureId, and \a textureTarget for this
+ widget's context.
*/
void QGLWidget::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget)
{
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index d6e0109..5f0aed4 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -416,7 +416,7 @@ void QGLBuffer::allocate(const void *data, int count)
\sa release(), create()
*/
-bool QGLBuffer::bind() const
+bool QGLBuffer::bind()
{
#ifndef QT_NO_DEBUG
if (!isCreated())
@@ -448,7 +448,7 @@ bool QGLBuffer::bind() const
\sa bind()
*/
-void QGLBuffer::release() const
+void QGLBuffer::release()
{
#ifndef QT_NO_DEBUG
if (!isCreated())
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index a1b45ff..9867f31 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -101,8 +101,8 @@ public:
void destroy();
- bool bind() const;
- void release() const;
+ bool bind();
+ void release();
static void release(QGLBuffer::Type type);
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 6571a76..ef115bd 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -499,10 +499,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
}
}
#endif
- if (d_ptr->paintedRegion.boundingRect() != geometry()) {
- // Emits warning if not supported. Should never happen unless
- // setPartialUpdateSupport(true) has been called.
- context()->d_func()->swapRegion(&d_ptr->paintedRegion);
+ if (d_ptr->paintedRegion.boundingRect() != geometry() &&
+ hasPartialUpdateSupport()) {
+ context()->d_func()->swapRegion(&d_ptr->paintedRegion);
} else
context()->swapBuffers();