Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

OpenGLES2 3D-Canvas in C++ on Android using Qt 5.2



  • Hi All,

    What is the right way to create an OpenGLES2 3D canvas in C++ for custom 3D rendering and to use QtQuick 2.0 for UI programming using Qt 5.2 on Android? Are there some examples for this use case? I was only able to find an "scenegraph/openglunderqml" example (http://qt-project.org/doc/qt-5.0/qtquick/scenegraph-openglunderqml.html). However, it doesn't look compatible with QtQuick 2.0.

    Regards,
    Oleg



  • Hi,
    You are correct, the scenegraph/openglunderqml example shows the right way how things need to be done if you want to mix your custom OpengGL scene & QtQuick 2.0 for UI. But I'm not quite sure what you mean by "it doesn’t look compatible with QtQuick 2.0".
    What is not compatible with QtQuick 2.0 ?
    You can see @import QtQuick 2.0@
    in main.qml of the example...



  • Hi Terenty,

    Thanks for your reply and sorry for an imprecise description. It looks like that something went wrong during installation of the Qt library. First

    "import OpenGLUnderQML 1.0"

    failed, then

    "Squircle" class

    from the example code couldn't be found at runtime. However, after reinstalling the library, recompiling the example and redeploying it, it works. I see the animation on my device :-)

    Regards,
    Oleg



  • Nice :) keep it up!


Log in to reply