Looking for a 3D OpenGL example in qml
for my next project I'm lokking for an similar example like the "Cube OpenGL ES 2.0 example" project for QT Quick (maybe a custom QQUickItem).
I want to create a 3D-Space, where the user can rotate the camera around a object, like a cube (for example like this: !http://www.hcubesys.com/wp-content/uploads/2014/03/4698-colored-cubes-1920x1080-3d-wallpaper.jpg(cube)!)
Can I realize this with a QQuickItem?
A simple search in this forum and you get "this ":http://qt-project.org/forums/viewthread/47187 or with google "this":http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html or "this":http://doc.qt.digia.com/qt-quick3d-snapshot/qml-item3d.html. There are a lot of possible ways to do what you want depends on your needs
I also struggled with perspective based OpenGL using QML as it seems like there is almost no examples availables.
Here is a link to a thread I started with a similar question:
In this thread, I was able to rotate a simple square using a perspective projection.
There is a Qt3d project that has been underway to include in the standard Qt5 since the beginning for Qt5 development but not released yet. Perhaps they will finally release it for Qt 5.5.
Render your OpenGL scene into a framebuffer object and use that to implement a custom Qt Quick 2 item. See the QQuickFramebufferObject documentation and linked examples.
Qt3D will provide a simple QML wrapper around OpenGL. It is already usable for your needs but you do need to build it from git at present.
Here my approach towards Qt Quick and OpenGL.
It's simple but indicative.
Yup that's another valid approach. Many ways to skin the same cat :)
So please add [SOLVED] to your thread title if the problem is solved so other forum members can quickly see if this thread helped or not.