Results 1 to 4 of 4

Thread: draw multiple custom openGL objects in a QQUickItem

  1. #1
    Join Date
    Jan 2015
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default draw multiple custom openGL objects in a QQUickItem

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: draw multiple custom openGL objects in a QQUickItem

    Looks like you are looking for something like Qt3D http://doc-snapshot.qt-project.org/qt3d-1.0/

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    notImplemented (7th January 2015)

  4. #3
    Join Date
    Jan 2015
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: draw multiple custom openGL objects in a QQUickItem

    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?

  5. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: draw multiple custom openGL objects in a QQUickItem

    I haven't worked with it yet, but my guess would be that this is possible.

    Cheers,
    _

Similar Threads

  1. Draw with OPenGL inside QMAinWindow
    By zulunation in forum Newbie
    Replies: 10
    Last Post: 12th November 2014, 11:35
  2. How to draw some objects one by one instantly?
    By weixj2003ld in forum Qt Programming
    Replies: 1
    Last Post: 10th July 2012, 12:53
  3. QGraphicsView, OpenGL, Buffer Objects
    By klou in forum Qt Programming
    Replies: 0
    Last Post: 20th January 2011, 06:03
  4. Qt Opengl, Changing objects color
    By bod in forum Qt Programming
    Replies: 4
    Last Post: 2nd July 2008, 13:13
  5. Replies: 5
    Last Post: 13th April 2007, 16:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.