summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-10-20 12:19:11 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-10-21 13:32:42 +0000
commit2a1d3f330d5f8cfc5358055b27e8e8301b3e050a (patch)
tree77ae0a427673106f25d87be15c39f7fbcb542387 /tests
parent3dff3fdefb0c01dc90d96e6e6f8e29c3f09183c8 (diff)
Add support for TEXTURE_EXTERNAL_OES in the internal texture blitter
Assuming that the target is always GL_TEXTURE_2D is not going to be sufficient when working with EGLStreams for example where GL_TEXTURE_EXTERNAL_OES is a must. The blitter is now changed to support multiple programs so other targets can easily be added as well in the future, if necessary. Change-Id: I247d30600222fb5af6305ed5d9740baa5e43e83e Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp
index 04c9b3f72c..2792f6f1a3 100644
--- a/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp
+++ b/tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp
@@ -61,6 +61,7 @@ QOpenGLTextureBlitWindow::QOpenGLTextureBlitWindow()
m_context->makeCurrent(this);
m_blitter.create();
+ qDebug("GL_TEXTURE_EXTERNAL_OES support: %d", m_blitter.supportsExternalOESTarget());
}
void QOpenGLTextureBlitWindow::render()
@@ -132,6 +133,12 @@ void QOpenGLTextureBlitWindow::render()
m_blitter.setSwizzleRB(false);
m_blitter.release();
+ if (m_blitter.supportsExternalOESTarget()) {
+ // Cannot do much testing here, just verify that bind and release work, meaning that the program is present.
+ m_blitter.bind(0x8D65);
+ m_blitter.release();
+ }
+
m_context->swapBuffers(this);
}