summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <[email protected]>2023-04-17 13:14:39 +0200
committerLaszlo Agocs <[email protected]>2023-04-18 13:23:48 +0200
commit99c8eca3f4364b1e062684dd71efc8c5c4b9059c (patch)
tree30607783e90f960b1b201410ac3a65d2a3b657a2
parent1645ce9a4aa39e43d4569eaa7f63225c5116fea4 (diff)
cube example: make sure the program is bound
...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 <[email protected]>
-rw-r--r--examples/opengl/cube/mainwidget.cpp1
1 files changed, 1 insertions, 0 deletions
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