Integrating OpenGL with Qt Quick 2 applications Part 1
This talk will introduce you to various effective strategies of drawing raw OpenGL content inside a Qt Quick 2 scene. After a brief introduction to how the Qt Quick 2 renderer works, we will see the APIs in Qt 5.6 that allow us to integrate existing OpenGL code and QML.
One of the foundation pillars of Qt Quick 2 is its OpenGL-based rendering pipeline. By leveraging the GPU capabilities, we get 60 frames-per-second animated scenes, real time eye candy and special effects, particles, and so on. Moreover, the main programming language is QML, which is extremely popular amongst developers and designers — it allows them to quickly prototype and build user interfaces. For these reasons, Qt Quick is becoming the de-facto choice on mobile and embedded platforms.
However, can we integrate Qt Quick 2 with an existing OpenGL codebase? Would it be possible to reuse old, working, tested OpenGL code and give it a new look and feel by building a Qt Quick interface that uses it? How far can we go with that integration?
In this talk, I will show the technologies available in Qt 5.6 that allow deep integration of Qt Quick 2 scenes with custom drawn OpenGL content. We will discuss the possibility of simply providing a Qt Quick overlay for an OpenGL scene. The discussion will then proceed to the creation of custom Qt Quick Items drawn using raw OpenGL commands, which can then be used from QML. Finally, I will illustrate how to manually drive Qt Quick’s own rendering if we need to be in complete control of how and when the rendering happens.
The audience is expected to have familiarity with basic QtQuick and OpenGL concepts, but no in-depth knowledge of them is required.
Can you share the source code of the demos?
the demo :3
https://github.com/KDAB/integrating-qq2-with-opengl
Thank you for sharing this, liked the talk, good quality code also.