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. Qt5.12.9: Example:OpenGL/Cube doesnt work
Forum Updated to NodeBB v4.3 + New Features

Qt5.12.9: Example:OpenGL/Cube doesnt work

Scheduled Pinned Locked Moved Solved General and Desktop
24 Posts 2 Posters 2.1k 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.
  • D Offline
    D Offline
    DaJose
    wrote on 22 Aug 2020, 18:43 last edited by
    #1

    Hello,

    does anybody know why the example Cube in OpenGL doesnt work? I am getting only a black screen.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 22 Aug 2020, 18:52 last edited by
      #2

      Hi,

      Which OS ?
      Which driver ?
      Which graphics card ?
      Do other OpenGL examples run properly ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DaJose
        wrote on 22 Aug 2020, 19:03 last edited by DaJose
        #3

        Hi,

        thanks for your response.

        OS: Windows 10
        Which driver: what you mean?
        Which Graphic card: AMD Radeon RX 5600 XT
        Do other OpenGL examples run: I can draw a Quad by using simply vertices. But it comes together with an IndexBuffer it doesn't work. So I tried to run the cube example what comes with IndexBuffer => only black screen
        So its my goal to render a simple quad by using IndexBuffer

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 22 Aug 2020, 19:05 last edited by
          #4

          @DaJose said in Qt5.12.9: Example:OpenGL/Cube doesnt work:

          Which driver: what you mean?

          The version of the driver of your card. If too old, it might break, sometimes, too new will as well.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DaJose
            wrote on 22 Aug 2020, 19:17 last edited by DaJose
            #5

            Okay, I try to look for the newest. But I think I've got the latest driver.

            So, I've installed the new driver but nothing changed. I only get a black screen

            I' am using Visual Studio (c++) 2017

            btw:
            I only can answer after 10minutes :(

            No Error messages...

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 22 Aug 2020, 19:17 last edited by
              #6

              Any error message ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DaJose
                wrote on 22 Aug 2020, 19:28 last edited by
                #7

                No error message.

                BTW:
                I can only answer after 10 minutes... that sucks a little bit :/

                S 1 Reply Last reply 22 Aug 2020, 20:30
                0
                • D DaJose
                  22 Aug 2020, 19:28

                  No error message.

                  BTW:
                  I can only answer after 10 minutes... that sucks a little bit :/

                  S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 22 Aug 2020, 20:30 last edited by
                  #8

                  Do the QWindow related examples work ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DaJose
                    wrote on 22 Aug 2020, 21:02 last edited by DaJose
                    #9

                    Yes, this works:
                    You mean the QOpenglwindow example from the OpenGL examples?

                    alt text

                    https://imgur.com/a/ce9DWX0

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 22 Aug 2020, 22:47 last edited by
                      #10

                      One thing that is missing from the example is printing errors in case something goes wrong in the initShaders method. I would add some debugging information there.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DaJose
                        wrote on 23 Aug 2020, 08:45 last edited by DaJose
                        #11

                        No error while compiling or linking or reading the shaders

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DaJose
                          wrote on 23 Aug 2020, 09:43 last edited by DaJose
                          #12

                          Maybe you got a simple VC 20017 project rendering something using IndexBuffer?
                          Maybe something is wrong with the settings...

                          Or I send you my project?

                          I have made a release and try to run it on another PC with the same result: just a blank black screen...

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            DaJose
                            wrote on 23 Aug 2020, 11:38 last edited by DaJose
                            #13

                            Update/Edit:
                            Now I've tested the Cube-Example with Qt Version 5.9.7 => it works!!

                            It seems that Qt version 5.12. got a Bug when using IndexBuffer or something!!!

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 23 Aug 2020, 21:03 last edited by
                              #14

                              Then test a more recent version to see if it's working better.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                DaJose
                                wrote on 24 Aug 2020, 07:45 last edited by DaJose
                                #15

                                Sure. But I use the precompiled version (Offline-Installer) and do not compile the source code. And Qt 5.12.9 is the latest release :/

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 24 Aug 2020, 19:10 last edited by
                                  #16

                                  Do you mean latest version of the offline installer ? IIRC, it should rather be 5.14.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    DaJose
                                    wrote on 26 Aug 2020, 15:36 last edited by
                                    #17

                                    Can you give me the link?
                                    I only found this: https://www.qt.io/offline-installers

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 26 Aug 2020, 18:04 last edited by
                                      #18

                                      Here

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        DaJose
                                        wrote on 26 Aug 2020, 18:33 last edited by DaJose
                                        #19

                                        Okay, I'm currently downloading it.

                                        btw:
                                        Works the OpenGL/Cube-Example on your side?
                                        If the answer is yes: which system you are using? Windows or Linux? Which compiler?

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          DaJose
                                          wrote on 26 Aug 2020, 19:02 last edited by DaJose
                                          #20

                                          Okay, all fine. I made it work with VC2017 with Qt 5.14.2.

                                          I am happy now :)

                                          S 1 Reply Last reply 26 Aug 2020, 19:44
                                          0

                                          1/24

                                          22 Aug 2020, 18:43

                                          • Login

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