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. Task-number: QTBUG-111304 Change-Id: I19792f5f193dcdb305473a939780df33deb1f8e1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 99c8eca3f4364b1e062684dd71efc8c5c4b9059c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
01566b5d66
commit
0f1929837a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user