diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-01 07:52:09 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-01 07:52:09 (GMT) |
commit | 871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f (patch) | |
tree | d9dcf9d8437c7a7777f64ce41f5f55a44269fee7 /tests/auto/qgl | |
parent | f23ab31348bb6d3c6b7cb1ccf429ea932824e4e4 (diff) | |
download | Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.zip Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.tar.gz Qt-871bdaff6d7ae05571830ae87d9de6ef4e2cdb9f.tar.bz2 |
QGLContext::areSharing() to check for GL share relationships
Reviewed-by: Samuel
Diffstat (limited to 'tests/auto/qgl')
-rw-r--r-- | tests/auto/qgl/tst_qgl.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index a49f543..f15b249 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -1799,13 +1799,13 @@ void tst_QGL::shareRegister() QVERIFY(list.contains(glw2->context())); // Check the sharing relationships. - QVERIFY(shareReg->checkSharing(glw1->context(), glw1->context())); - QVERIFY(shareReg->checkSharing(glw2->context(), glw2->context())); - QVERIFY(shareReg->checkSharing(glw1->context(), glw2->context())); - QVERIFY(shareReg->checkSharing(glw2->context(), glw1->context())); - QVERIFY(!shareReg->checkSharing(0, glw2->context())); - QVERIFY(!shareReg->checkSharing(glw1->context(), 0)); - QVERIFY(!shareReg->checkSharing(0, 0)); + QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context())); + QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context())); + QVERIFY(QGLContext::areSharing(glw1->context(), glw2->context())); + QVERIFY(QGLContext::areSharing(glw2->context(), glw1->context())); + QVERIFY(!QGLContext::areSharing(0, glw2->context())); + QVERIFY(!QGLContext::areSharing(glw1->context(), 0)); + QVERIFY(!QGLContext::areSharing(0, 0)); // Create a third context, not sharing with the others. QGLWidget *glw3 = new QGLWidget(); @@ -1827,20 +1827,20 @@ void tst_QGL::shareRegister() QCOMPARE(list.size(), 0); // Check the sharing relationships again. - QVERIFY(shareReg->checkSharing(glw1->context(), glw1->context())); - QVERIFY(shareReg->checkSharing(glw2->context(), glw2->context())); - QVERIFY(shareReg->checkSharing(glw1->context(), glw2->context())); - QVERIFY(shareReg->checkSharing(glw2->context(), glw1->context())); - QVERIFY(!shareReg->checkSharing(glw1->context(), glw3->context())); - QVERIFY(!shareReg->checkSharing(glw2->context(), glw3->context())); - QVERIFY(!shareReg->checkSharing(glw3->context(), glw1->context())); - QVERIFY(!shareReg->checkSharing(glw3->context(), glw2->context())); - QVERIFY(shareReg->checkSharing(glw3->context(), glw3->context())); - QVERIFY(!shareReg->checkSharing(0, glw2->context())); - QVERIFY(!shareReg->checkSharing(glw1->context(), 0)); - QVERIFY(!shareReg->checkSharing(0, glw3->context())); - QVERIFY(!shareReg->checkSharing(glw3->context(), 0)); - QVERIFY(!shareReg->checkSharing(0, 0)); + QVERIFY(QGLContext::areSharing(glw1->context(), glw1->context())); + QVERIFY(QGLContext::areSharing(glw2->context(), glw2->context())); + QVERIFY(QGLContext::areSharing(glw1->context(), glw2->context())); + QVERIFY(QGLContext::areSharing(glw2->context(), glw1->context())); + QVERIFY(!QGLContext::areSharing(glw1->context(), glw3->context())); + QVERIFY(!QGLContext::areSharing(glw2->context(), glw3->context())); + QVERIFY(!QGLContext::areSharing(glw3->context(), glw1->context())); + QVERIFY(!QGLContext::areSharing(glw3->context(), glw2->context())); + QVERIFY(QGLContext::areSharing(glw3->context(), glw3->context())); + QVERIFY(!QGLContext::areSharing(0, glw2->context())); + QVERIFY(!QGLContext::areSharing(glw1->context(), 0)); + QVERIFY(!QGLContext::areSharing(0, glw3->context())); + QVERIFY(!QGLContext::areSharing(glw3->context(), 0)); + QVERIFY(!QGLContext::areSharing(0, 0)); // Shared guard should still be the same. QVERIFY(guard.context() == glw1->context()); |