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 <morten.sorvig@qt.io>
This commit is contained in:
Laszlo Agocs 2023-04-17 13:14:39 +02:00
parent 1645ce9a4a
commit 99c8eca3f4

View File

@ -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