I am using Qt 5.4, QtQuick 2.4.
Basically, I would like to provide raw OpenGL to an application written in QtQuick / QML, and I would like to do this when used QQmlApplicationEngine.
The main tutorial that I read is (apparently) fairly standard, found here .
However, this tutorial uses QQuickView, not QQmlApplicationEngineto load, the QML interface. If I changed the code to use QQmlApplicationEngine, GL rendering no longer works, and I really don't understand why.
Code in this GitHub promises repository for drawing the source OpenGL in a QtQuick application using QQmlApplicationEngine and even manages to keep this promise, but it does this by connecting to QQuickWindow::afterRendering(see line 79 of squircle.cpp). If this signal / slot connection is changed to connect to QQuickQindow::beforeRendering, part of the GL scene again looks unloaded. This IMO is the simplest example that reproduces the problem I am encountering (with the exception of some template hanging around).
QQuickWindow::clearBeforeRendering appears (correctly) for the false parameter (line 86 of the same file).
Did I miss something?
source
share