summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp')
-rw-r--r--tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp b/tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp
index 91fe3d3d4..46897ab49 100644
--- a/tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp
+++ b/tests/auto/render/graphicshelpergl4/tst_graphicshelpergl4.cpp
@@ -461,15 +461,35 @@ private Q_SLOTS:
QVERIFY(fboId != 0);
// WHEN
- m_glHelper.bindFrameBufferObject(fboId);
+ m_glHelper.bindFrameBufferObject(fboId, GraphicsHelperInterface::FBODraw);
// THEN
- const GLint error = m_func->glGetError();
+ GLint error = m_func->glGetError();
QVERIFY(error == 0);
GLint boundindFBOId = 0;
m_func->glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &boundindFBOId);
QVERIFY(GLuint(boundindFBOId) == fboId);
+ // WHEN
+ m_glHelper.bindFrameBufferObject(fboId, GraphicsHelperInterface::FBORead);
+
+ // THEN
+ error = m_func->glGetError();
+ QVERIFY(error == 0);
+ boundindFBOId = 0;
+ m_func->glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, &boundindFBOId);
+ QVERIFY(GLuint(boundindFBOId) == fboId);
+
+ // WHEN
+ m_glHelper.bindFrameBufferObject(fboId, GraphicsHelperInterface::FBOReadAndDraw);
+
+ // THEN
+ error = m_func->glGetError();
+ QVERIFY(error == 0);
+ boundindFBOId = 0;
+ m_func->glGetIntegerv(GL_FRAMEBUFFER_BINDING, &boundindFBOId);
+ QVERIFY(GLuint(boundindFBOId) == fboId);
+
// Cleanup
m_func->glDeleteFramebuffers(1, &fboId);
}