summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp')
-rw-r--r--tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp b/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
index fb0265427..b66192835 100644
--- a/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
+++ b/tests/auto/render/graphicshelpergl3_2/tst_graphicshelpergl3_2.cpp
@@ -177,7 +177,7 @@ class tst_GraphicsHelperGL3_2 : public QObject
Q_OBJECT
private Q_SLOTS:
- void initTestCase()
+ void init()
{
m_window.reset(new QWindow);
m_window->setSurfaceType(QWindow::OpenGLSurface);
@@ -209,7 +209,7 @@ private Q_SLOTS:
}
}
- void cleanupTestCase()
+ void cleanup()
{
m_glContext.doneCurrent();
}
@@ -1867,6 +1867,11 @@ private Q_SLOTS:
if (!m_initializationSuccessful)
QSKIP("Initialization failed, OpenGL 3.2 Core functions not supported");
+ GLint maxSamples;
+ m_func->glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
+ if (maxSamples < 1)
+ QSKIP("This test requires an implementation that supports multisampled textures");
+
// GIVEN
GLuint fbos[2];
GLuint fboTextures[2];
@@ -1875,7 +1880,7 @@ private Q_SLOTS:
m_func->glGenTextures(2, fboTextures);
m_func->glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, fboTextures[0]);
- m_func->glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, 4, GL_RGBA8, 10, 10, true);
+ m_func->glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE, maxSamples, GL_RGBA8, 10, 10, true);
m_func->glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0);
m_func->glBindTexture(GL_TEXTURE_2D, fboTextures[1]);