From 2a1d3f330d5f8cfc5358055b27e8e8301b3e050a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 20 Oct 2015 12:19:11 +0200 Subject: 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 --- tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/manual/qopengltextureblitter/qopengltextureblitwindow.cpp') 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); } -- cgit v1.2.3