summaryrefslogtreecommitdiffstats
path: root/src/qtmultimediaquicktools
diff options
context:
space:
mode:
Diffstat (limited to 'src/qtmultimediaquicktools')
-rw-r--r--src/qtmultimediaquicktools/qsgvideonode_yuv.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp
index 9da1023bb..c920ba3b9 100644
--- a/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp
+++ b/src/qtmultimediaquicktools/qsgvideonode_yuv.cpp
@@ -318,7 +318,8 @@ void QSGVideoMaterial_YUV::bind()
m_frame = QVideoFrame();
} else {
- for (int i = 0; i < m_planeCount; ++i) {
+ // Go backwards to finish with GL_TEXTURE0
+ for (int i = m_planeCount - 1; i >= 0; --i) {
functions->glActiveTexture(GL_TEXTURE0 + i);
functions->glBindTexture(GL_TEXTURE_2D, m_textureIds[i]);
}