summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp')
-rw-r--r--tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp b/tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp
index 6c756957f..ffafc2312 100644
--- a/tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp
+++ b/tests/auto/render/graphicshelpergl2/tst_graphicshelpergl2.cpp
@@ -1557,6 +1557,24 @@ private Q_SLOTS:
// Not supported by GL2
}
+ void rasterMode()
+ {
+ if (!m_initializationSuccessful)
+ QSKIP("Initialization failed, OpenGL 2.0 functions not supported");
+
+ m_func->glGetError();
+
+ // WHEN
+ m_glHelper.rasterMode(GL_FRONT_AND_BACK, GL_LINE);
+
+ // THEN
+ const GLint error = m_func->glGetError();
+ QVERIFY(error == 0);
+ GLint p;
+ m_func->glGetIntegerv(GL_POLYGON_MODE, &p);
+ QCOMPARE(p, GL_LINE);
+ }
+
private:
QScopedPointer<QWindow> m_window;
QOpenGLContext m_glContext;