summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-02-23 16:12:30 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-02-23 16:25:33 (GMT)
commit541ca25dc71545e1b55ad31cffe7df4b49214a48 (patch)
tree8bb399cf71db957b8fbf3a574ef7ba2d294bdb36 /tests/auto/qgl
parent3051d63505567bc52bfb6ccdf1e93559245ac24f (diff)
downloadQt-541ca25dc71545e1b55ad31cffe7df4b49214a48.zip
Qt-541ca25dc71545e1b55ad31cffe7df4b49214a48.tar.gz
Qt-541ca25dc71545e1b55ad31cffe7df4b49214a48.tar.bz2
Skip complex FBO tests if combined depth-stencil isn't supported
Reviewed-By: Trond Kjernåsen
Diffstat (limited to 'tests/auto/qgl')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 2773d08..280c6c8 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -1111,6 +1111,11 @@ void tst_QGL::glFBORendering()
// Don't complicate things by using NPOT:
QGLFramebufferObject *fbo = new QGLFramebufferObject(256, 128, fboFormat);
+ if (fbo->attachment() != QGLFramebufferObject::CombinedDepthStencil) {
+ delete fbo;
+ QSKIP("FBOs missing combined depth~stencil support", SkipSingle);
+ }
+
QPainter fboPainter;
bool painterBegun = fboPainter.begin(fbo);
QVERIFY(painterBegun);
@@ -1145,6 +1150,16 @@ void tst_QGL::multipleFBOInterleavedRendering()
QGLFramebufferObject *fbo2 = new QGLFramebufferObject(256, 128, fboFormat);
QGLFramebufferObject *fbo3 = new QGLFramebufferObject(256, 128, fboFormat);
+ if ( (fbo1->attachment() != QGLFramebufferObject::CombinedDepthStencil) ||
+ (fbo2->attachment() != QGLFramebufferObject::CombinedDepthStencil) ||
+ (fbo3->attachment() != QGLFramebufferObject::CombinedDepthStencil) )
+ {
+ delete fbo1;
+ delete fbo2;
+ delete fbo3;
+ QSKIP("FBOs missing combined depth~stencil support", SkipSingle);
+ }
+
QPainter fbo1Painter;
QPainter fbo2Painter;
QPainter fbo3Painter;
@@ -1250,7 +1265,7 @@ protected:
QPainter widgetPainter;
widgetPainterBeginOk = widgetPainter.begin(this);
QGLFramebufferObjectFormat fboFormat;
- fboFormat.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
+ fboFormat.setAttachment(QGLFramebufferObject::NoAttachment);
QGLFramebufferObject *fbo = new QGLFramebufferObject(128, 128, fboFormat);
QPainter fboPainter;