diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-01-26 11:27:37 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-01-26 11:27:37 +0000 |
commit | 0a1af55a9b69f7fd58dbce43a0d4c1faf0143838 (patch) | |
tree | 26da168e740734d168be37803abec2f8739b213d /tests/auto/gui/qopengl | |
parent | b8fb0ee999d32401157be8d86e5a03185aadbb9e (diff) | |
parent | 158a3a4159bdc5a49caecd63e021dacbc06cf23c (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/gui/qopengl')
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 601553e2e7..15244744bf 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -34,6 +34,7 @@ #include <QtGui/QOpenGLVertexArrayObject> #include <QtGui/QOpenGLBuffer> #include <QtGui/QOpenGLPaintDevice> +#include <QtGui/QOpenGLTexture> #include <QtGui/QPainter> #include <QtGui/QScreen> #include <QtGui/QWindow> @@ -94,8 +95,8 @@ private slots: void textureblitterFullTargetRectTransform(); void textureblitterPartTargetRectTransform(); void defaultSurfaceFormat(); - void imageFormatPainting(); + void nullTextureInitializtion(); #ifdef USE_GLX void glxContextWrap(); @@ -1519,6 +1520,18 @@ void tst_QOpenGL::bufferMapRange() ctx->doneCurrent(); } +void tst_QOpenGL::nullTextureInitializtion() +{ + QScopedPointer<QSurface> surface(createSurface(QSurface::Window)); + QOpenGLContext ctx; + ctx.create(); + ctx.makeCurrent(surface.data()); + + QImage i; + QOpenGLTexture t(i); + QVERIFY(!t.isCreated()); +} + QTEST_MAIN(tst_QOpenGL) #include "tst_qopengl.moc" |