Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Demo: Integrating OpenSceneGraph with Qt Quick
Forum Updated to NodeBB v4.3 + New Features

Demo: Integrating OpenSceneGraph with Qt Quick

Scheduled Pinned Locked Moved 3rd Party Software
osgosgearthopenscenegraphquickqml
20 Posts 6 Posters 28.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rooi
    wrote on last edited by
    #11

    Hi Konstantin,

    I recently got some more time to look into your project again. As I stated before I like the way you integrate osg and qt/qml.

    I tried to extent the functionality by adding some osg pickers to allow identifying the name and type of a node underneath the mouse. This seems to work initially, but unfortunatly it doesn't after a resize of the window.

    Do you have any idea why this occurs? My guess is that something does not get the new window size after a resize, but which object? Hopefully you could give me another pointer to try and get this fixed.

    Thank you very much!

    Rooi

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rooi
      wrote on last edited by
      #12

      Hi,

      I managed to get the picker to work by doing the following:

      Add the following lines to updateViewport()
      QSize size(quickItem->boundingRect().size().toSize());
      if(view->getCamera()->getGraphicsContext())
      view->getCamera()->getGraphicsContext()->resized( 0, 0, size.width(), size.height() );

      Thanks.

      V 1 Reply Last reply
      0
      • A Offline
        A Offline
        alydev
        wrote on last edited by
        #13

        Is someone can send me the demo ? I can't download it...

        1 Reply Last reply
        0
        • podsvirovP Offline
          podsvirovP Offline
          podsvirov
          wrote on last edited by
          #14

          I am sorry, but the link to the archive is not working.
          You can try to get the code via git:
          @
          git clone git://podsvirov.pro/osg/osgqtquick.git
          @

          1 Reply Last reply
          0
          • podsvirovP Offline
            podsvirovP Offline
            podsvirov
            wrote on last edited by
            #15

            Good news: a link to a screenshot and the source code in the archive is working again!

            1 Reply Last reply
            0
            • A Offline
              A Offline
              anu.rastogi
              wrote on last edited by
              #16

              Hi Konstantin,

              Sub: enable multisampling

              Your example is really well done, Thanks. Now I want to enable multisampling, but I can not figure out how to enable it. I want to use the buffer mode.
              The QOpenGLFramebufferObjectFormat.setSamples(4) does not seem to work. I don't have a very deep knowledge or osg::GraphicsWindow and its traits. But if you can guide me, I can take a look.

              Thanks a lot,

              1 Reply Last reply
              0
              • A Offline
                A Offline
                anu.rastogi
                wrote on last edited by
                #17

                Hi Konstantin,

                Sub: enable multisampling

                Your example is really well done, Thanks. Now I want to enable multisampling, but I can not figure out how to enable it. I want to use the buffer mode.
                The QOpenGLFramebufferObjectFormat.setSamples(4) does not seem to work. I don't have a very deep knowledge or osg::GraphicsWindow and its traits. But if you can guide me, I can take a look.

                Thanks a lot,

                1 Reply Last reply
                0
                • R rooi

                  Hi,

                  I managed to get the picker to work by doing the following:

                  Add the following lines to updateViewport()
                  QSize size(quickItem->boundingRect().size().toSize());
                  if(view->getCamera()->getGraphicsContext())
                  view->getCamera()->getGraphicsContext()->resized( 0, 0, size.width(), size.height() );

                  Thanks.

                  V Offline
                  V Offline
                  Voya
                  wrote on last edited by
                  #18

                  @rooi
                  oh I am facing the same problem as you did. when I resize the windows ,it seems that the Qopenglcontext turn to null . so the fbo is initialized failed. using the method you give it does not work . i try to delete the updatafbo it works but the size of texture does not changed any more.

                  1 Reply Last reply
                  0
                  • podsvirovP Offline
                    podsvirovP Offline
                    podsvirov
                    wrote on last edited by JKSH
                    #19

                    Meet osgQtQuick 2.0!

                    1 Reply Last reply
                    0
                    • podsvirovP Offline
                      podsvirovP Offline
                      podsvirov
                      wrote on last edited by
                      #20

                      Wow! More than 10 000 views :-)
                      It seems that many who like it!

                      I repeat: Meet osgQtQuick 2.0!

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved