Hi,
I am working on a project for Sailfish OS (Qt 4.8) app.
I need to integrate openGL into QML using a QDeclarativeView.
Seen and tried the examples as shown in the Qt Forums.
They all:
set a QGLWidget as the viewport of the QDeclarativeView;
Use a QDeclarativeItem and re-implement the paint function with:
beginNativePainting() etc.;
qmlRegisterType is used to bind the QDeclarativeItem class to a QML type.
This looks nice (as in the examples) if you have some simple fixed pipeline rendering, but I need to use a lot of extra openGL functionality (like setAttribute, QGLShaderProgram, compileSourceCode, etc.).
This is all neatly implemented in QGLWidget, but not in QDeclarativeItem which is now responsible for the openGL rendering/painting.
So, is there a way have the QGLWidget available / accessible in QML?
Thanks.
↧