diff options
Diffstat (limited to 'tests/auto/opengl')
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index 077285213b..252772c78a 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -72,7 +72,12 @@ public: private slots: void initTestCase(); void getSetCheck(); +#ifdef QT_BUILD_INTERNAL + void qglContextDefaultBindTexture(); void openGLVersionCheck(); + void shareRegister(); + void textureCleanup(); +#endif void graphicsViewClipping(); void partialGLWidgetUpdates_data(); void partialGLWidgetUpdates(); @@ -91,9 +96,6 @@ private slots: void replaceClipping(); void clipTest(); void destroyFBOAfterContext(); - void shareRegister(); - void qglContextDefaultBindTexture(); - void textureCleanup(); void threadImages(); void nullRectCrash(); }; @@ -654,9 +656,9 @@ extern QGLFormat::OpenGLVersionFlags qOpenGLVersionFlagsFromString(const QString QT_END_NAMESPACE #endif +#ifdef QT_BUILD_INTERNAL void tst_QGL::openGLVersionCheck() { -#ifdef QT_BUILD_INTERNAL QString versionString; QGLFormat::OpenGLVersionFlags expectedFlag; QGLFormat::OpenGLVersionFlags versionFlag; @@ -751,8 +753,8 @@ void tst_QGL::openGLVersionCheck() #else QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1); #endif //defined(QT_OPENGL_ES_1) -#endif //QT_BUILD_INTERNAL } +#endif //QT_BUILD_INTERNAL static bool fuzzyComparePixels(const QRgb testPixel, const QRgb refPixel, const char* file, int line, int x = -1, int y = -1) { @@ -1817,12 +1819,12 @@ int tst_QGLResource::deletions = 0; #ifdef TODO Q_GLOBAL_STATIC(QOpenGLContextGroupResource<tst_QGLResource>, qt_shared_test) #endif //TODO -#endif +#endif // QT_BUILD_INTERNAL +#ifdef QT_BUILD_INTERNAL void tst_QGL::shareRegister() { #ifdef TODO -#ifdef QT_BUILD_INTERNAL // Create a context. QGLWidget *glw1 = new QGLWidget(); glw1->makeCurrent(); @@ -1932,14 +1934,14 @@ void tst_QGL::shareRegister() QVERIFY(guard.id() == 0); QVERIFY(guard3.context() == 0); QVERIFY(guard3.id() == 0); -#endif #endif //TODO } +#endif // Tests QGLContext::bindTexture with default options +#ifdef QT_BUILD_INTERNAL void tst_QGL::qglContextDefaultBindTexture() { -#ifdef QT_BUILD_INTERNAL QGLWidget w; w.makeCurrent(); QGLContext *ctx = const_cast<QGLContext*>(w.context()); @@ -1981,12 +1983,12 @@ void tst_QGL::qglContextDefaultBindTexture() ctx->deleteTexture(boundPixmapTextureId); QCOMPARE((bool)glIsTexture(boundImageTextureId), GL_FALSE); QCOMPARE((bool)glIsTexture(boundPixmapTextureId), GL_FALSE); -#endif } +#endif +#ifdef QT_BUILD_INTERNAL void tst_QGL::textureCleanup() { -#ifdef QT_BUILD_INTERNAL QGLWidget w; w.resize(200,200); w.show(); @@ -2176,8 +2178,8 @@ void tst_QGL::textureCleanup() copyOfPixmap = QPixmap(); QCOMPARE(QGLTextureCache::instance()->size(), startCacheItemCount); -#endif } +#endif namespace ThreadImages { |