Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]OpenGL as underlay with qml
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]OpenGL as underlay with qml

Scheduled Pinned Locked Moved General and Desktop
12 Posts 2 Posters 3.1k Views 2 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.
  • sajis997S Offline
    sajis997S Offline
    sajis997
    wrote on last edited by
    #2

    Sorry folks, I believe that I have not explained enough. I cannot access the size of the vector while debugging. If I could access the size , I could have assumed the reason behind the crash.

    Thanks

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #3

      Hi, what you mean not access ?
      I can see a std::vector and even expand it to see all elements.

      However, I had to do the following
      Tools -> Options -> Debugger -> GDB tab
      Uncheck the option (Load system GDB pretty printers)

      For it to work.

      No idea if its related to what you ask but better to ask than to assume its not :)

      sajis997S 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi, what you mean not access ?
        I can see a std::vector and even expand it to see all elements.

        However, I had to do the following
        Tools -> Options -> Debugger -> GDB tab
        Uncheck the option (Load system GDB pretty printers)

        For it to work.

        No idea if its related to what you ask but better to ask than to assume its not :)

        sajis997S Offline
        sajis997S Offline
        sajis997
        wrote on last edited by
        #4

        @mrjj

        Thanks for the hint , it did solve part of the issue, I do can see the value of the 3rd party library members (glm) and am still working on what may have causing the crash without any hint. I have tried with gdb backtrace command , but it shows only ?? and as mentioned before the application crashes at

        glDrawArrays(GL_LINE_STRIP,0,mShowPoints);
        

        Any further hint over this ?

        Thanks

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #5

          @sajis997 said:
          have you output value of mShowPoints ?
          Any chance it get bigger than the list ?

          also did you check that
          sizeof(glm::vec3) * mVertices.size()
          yields the expected size?

          1 Reply Last reply
          0
          • sajis997S Offline
            sajis997S Offline
            sajis997
            wrote on last edited by
            #6

            Hi

            I am sorry. I would like to ask, did you manage all the element values of std::vectorglm::vec3 mVertices ? I still cannot , even after I made the necessary changes as you suggested. It shows "not accessible".

            Thanks

            mrjjM 1 Reply Last reply
            0
            • sajis997S sajis997

              Hi

              I am sorry. I would like to ask, did you manage all the element values of std::vectorglm::vec3 mVertices ? I still cannot , even after I made the necessary changes as you suggested. It shows "not accessible".

              Thanks

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @sajis997
              Hi well I did not try with that type (glm::vec3) but
              for my own std::vector with all types I can see inside. even expand the inner struct/class.
              Are you on windows or linux/mac?

              sajis997S 1 Reply Last reply
              0
              • mrjjM mrjj

                @sajis997
                Hi well I did not try with that type (glm::vec3) but
                for my own std::vector with all types I can see inside. even expand the inner struct/class.
                Are you on windows or linux/mac?

                sajis997S Offline
                sajis997S Offline
                sajis997
                wrote on last edited by
                #8

                @mrjj

                I am at Ubuntu Linux with Qt 5.4.1 on it.

                mrjjM 1 Reply Last reply
                0
                • sajis997S sajis997

                  @mrjj

                  I am at Ubuntu Linux with Qt 5.4.1 on it.

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  @sajis997
                  Strange it was exactly on ubuntu I had that
                  problem also and the after the option It did show.

                  if you make another list say with <int>, it is still not willing to show it ?

                  sajis997S 1 Reply Last reply
                  0
                  • mrjjM mrjj

                    @sajis997
                    Strange it was exactly on ubuntu I had that
                    problem also and the after the option It did show.

                    if you make another list say with <int>, it is still not willing to show it ?

                    sajis997S Offline
                    sajis997S Offline
                    sajis997
                    wrote on last edited by
                    #10

                    @mrjj

                    I checked with the vector :

                    std::vector<GLushort> mIndices;
                    

                    And I do see all the values inside the vector for type GLushort , but not for type glm::vec3 type. The latter shows "not accessible".
                    In that case I cannot be sure if the vector is getting populated with the value I am looking for which may have caused the crash at the point mentioned in my last post.

                    Thanks

                    1 Reply Last reply
                    0
                    • mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #11

                      @sajis997 said:

                      glm::vec3

                      Ok. Maybe the namespace confuses it.
                      If you press F2 and see definition and then copy it to you program to say
                      vec3Test
                      and make a list with that, will it see it then ?
                      Also you could try to switch to clang code model and see if that helps. (in options)

                      1 Reply Last reply
                      0
                      • sajis997S Offline
                        sajis997S Offline
                        sajis997
                        wrote on last edited by
                        #12

                        I checked the value of size of the vector mVertices and the value of the variable mShowPoints and both of them are showing the same value in the debugger. The application still crashes at

                        glDrawArrays(GL_LINE_STRIP,0,mShowPoints);
                        

                        Any more hint to look into ?

                        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