From 99c8eca3f4364b1e062684dd71efc8c5c4b9059c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 17 Apr 2023 13:14:39 +0200 Subject: [PATCH] cube example: make sure the program is bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...in paintGL. There is nothing saying the current program (or other state) cannot change between paintGL calls (or initializeGL and paintGL calls). Correctly call program.bind(). This eliminates the WebGL warning with WebAssembly. Pick-to: 6.5 6.4 Task-number: QTBUG-111304 Change-Id: I19792f5f193dcdb305473a939780df33deb1f8e1 Reviewed-by: Morten Johan Sørvig --- examples/opengl/cube/mainwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp index 485bca54f41..50207a9f223 100644 --- a/examples/opengl/cube/mainwidget.cpp +++ b/examples/opengl/cube/mainwidget.cpp @@ -148,6 +148,7 @@ void MainWidget::paintGL() glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); texture->bind(); + program.bind(); //! [6] // Calculate model view transformation