PDA

View Full Version : draw multiple custom openGL objects in a QQUickItem



notImplemented
6th January 2015, 20:04
Hello,
for a little project I must do some work with OpenGL that is executed in a custom QQuickItem.
This is my first contact with OpenGL. I had looked for the basic openGL examples like "cube OpenGL ES 2" or "Scene Graph - OpenGL under QML".

In my project, I want to create a different count of objects (balls) that are distributed in a 3D space.
OpenGL itself doesn't handle the object-oriented-paradigm, isn't it?
How can I create a class for a openGL object (for example ball), so I can draw multiple items of the same object to different places? So I only set up the position and the color


thank you for your help

anda_skoa
7th January 2015, 10:35
Looks like you are looking for something like Qt3D http://doc-snapshot.qt-project.org/qt3d-1.0/

Cheers,
_

notImplemented
7th January 2015, 17:22
Hi,
I'm builded qt3d. Thanks, that looks nice.

Is it posible to extend the ViewPort in qml and add new objects from c++ side?

anda_skoa
7th January 2015, 18:10
I haven't worked with it yet, but my guess would be that this is possible.

Cheers,
_