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. Strange Behaviour with a Multi-Monitor-Set and OpenGL
QtWS25 Last Chance

Strange Behaviour with a Multi-Monitor-Set and OpenGL

Scheduled Pinned Locked Moved Solved General and Desktop
openglmulti-screenwidget
15 Posts 3 Posters 6.8k Views
  • 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.
  • S Offline
    S Offline
    SebastianFFM81
    wrote on 18 Jul 2016, 13:26 last edited by SebastianFFM81
    #1

    Hi,
    I'm working on a tool to present measured BRDF-Values. My workplace is a Laptop with 2 External-Monitors.
    On my Mainwindow i have a Widget-Container which i promote to a C++ Class:

    • class BasicLambertOGLwidget : public QOpenGLWidget, protected QOpenGLFunctions

    So the Tool is working fine, but now comes the problem. By disconnecting the 2 External-Monitors and working only on my Laptop-Monitor the OpenGL widget shows only black, by starting out of the Qt Programm. And if I start the .exe, even the normal GUI like a Button is lost, only a white window is left...
    I can start the Programm with Multi-Monitors, disconnect the Monitors and everything is fine on the Laptop-Monitor.
    But even when i start Qt only on my Laptop and start a new Project with a OpenGL Widget it doesn't work, but when i connect the externals it's ok... Kind of crazy behaviour.

    I updated to Win10, reinstalled VS and QT, but nothing helps.

    Maybe somebody got a solution for this? i would really appreciate help. Its part of my master thesis and i'm going a bit crazy about this...

    thx

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Jul 2016, 22:39 last edited by
      #2

      Hi and welcome to devnet,

      Which version of Qt are you currently using ?

      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
      • S Offline
        S Offline
        SebastianFFM81
        wrote on 19 Jul 2016, 00:08 last edited by
        #3

        Hi there and thx for the welcome,

        it's my first project with Qt and i'am using:
        Qt Creator 4.0.2
        Based on Qt 5.7.0 (MSVC 2013, 32 bit)
        Built on Jun 13 2016 01:04:04
        From revision 47b4f2c738

        Build&Run settings:
        Desktop Qt 5.7.0 MSVC2015_64bit

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 19 Jul 2016, 21:50 last edited by
          #4

          Can you check against the current 5.6 version ?

          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
          • S Offline
            S Offline
            SebastianFFM81
            wrote on 21 Jul 2016, 22:17 last edited by
            #5

            I was able to check the .exe file on a Laptop of a friend of mine and it worked.
            Same File on my Laptop does not.
            So it seems to be a problem with my hardware, maybe the internal Graphic driver isn't working, because the Nvidia graphic cards starts with external monitors.

            But thx for your input and support.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 21 Jul 2016, 22:25 last edited by
              #6

              IIRC nVidia drivers on Windows have had some troubles lately so it could be related.

              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
              • S Offline
                S Offline
                SebastianFFM81
                wrote on 21 Jul 2016, 22:47 last edited by
                #7

                but it works with the nvidia graphic card. If i start the .exe or Qt with forced use of the nvidia graphic card, it looks ok. Only when i start it with the intel hd graphics 3000 it refuse to work. Is there a know problem with intel hd 3000?

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 21 Jul 2016, 22:50 last edited by
                  #8

                  Haaaaaa sorry. HD3000 ? Isn't that a pretty old card ?

                  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
                  • S Offline
                    S Offline
                    SebastianFFM81
                    wrote on 21 Jul 2016, 23:12 last edited by SebastianFFM81
                    #9

                    Relatively ;) i've got a Dell XPS 15 L502x with i7 and nvidia GT 540m... from 2011... is 5 years that much old?
                    Well i am about to buy a new little 13" Laptop. The Dell isn't soooo mobile. I hope the programm will work with the new Laptop integrated intel HD....
                    For now i can live with the workaround to activate the nvidia when starting Qt...
                    should i mark this as solved or delete the topic?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SebastianFFM81
                      wrote on 22 Jul 2016, 15:44 last edited by
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 22 Jul 2016, 22:09 last edited by
                        #11

                        5 years is already pretty old on the computer market.

                        Don't delete it, somebody else might also get hit by this problem.

                        Did you check if there was any update for the Intel graphic card ?

                        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
                        • Chris KawaC Offline
                          Chris KawaC Offline
                          Chris Kawa
                          Lifetime Qt Champion
                          wrote on 23 Jul 2016, 10:14 last edited by Chris Kawa
                          #12

                          Intel HD 3000 should support something like OpenGL 3.1. First check if you have at least version 2.1 support present in your system. You can use something like GL View or glewinfo from GLEW package.
                          If not then make sure you have the latest drivers for your graphics chip.
                          Also check what context version and profile you're requesting in your app and check the version you're given.

                          1 Reply Last reply
                          1
                          • S Offline
                            S Offline
                            SebastianFFM81
                            wrote on 23 Jul 2016, 13:19 last edited by SebastianFFM81
                            #13

                            The HD 3000 supports OpenGL up to 3.1 and I reinstalled the newest drivers: Intel Build 9.17.10.4229

                            I checked for the context Version with Intel HD:

                            Context valid: true
                            Really used OpenGl: 2 . 0
                            OpenGl information: VENDOR: Google Inc.
                            RENDERDER: ANGLE (Intel(R) HD Graphics 3000 Direct3D11 vs_4_1 ps_4_1)
                            VERSION: OpenGL ES 2.0 (ANGLE 2.1.0.8613f4946861)
                            GLSL VERSION: OpenGL ES GLSL ES 1.00 (ANGLE 2.1.0.8613f4946861)

                            and on Nvidia:

                            Context valid: true
                            Really used OpenGl: 4 . 5
                            OpenGl information: VENDOR: NVIDIA Corporation
                            RENDERDER: GeForce GT 540M/PCIe/SSE2
                            VERSION: 4.5.0 NVIDIA 368.81
                            GLSL VERSION: 4.50 NVIDIA

                            So my Intel HD uses only 2.0, after some reading i added this to my main.cpp:

                            QSurfaceFormat format;
                            format.setVersion(3, 1);
                            format.setProfile(QSurfaceFormat::CoreProfile);
                            format.setDepthBufferSize(24);
                            format.setStencilBufferSize(8);
                            QSurfaceFormat::setDefaultFormat(format)

                            and get this verion out:

                            ****Context valid: true
                            Really used OpenGl: 3 . 0
                            OpenGl information: VENDOR: Google Inc.
                            RENDERDER: ANGLE (Intel(R) HD Graphics 3000 Direct3D11 vs_4_1 ps_4_1)
                            VERSION: OpenGL ES 3.0 (ANGLE 2.1.0.8613f4946861)
                            GLSL VERSION: OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.8613f4946861) ****

                            But its still not working :(
                            Here is maybe an explanation? The pre-compiled Windows desktop version of Qt5 is built against ANGLE which only provides OpenGL ES 2 support by implementing it on top of DirectX 9.

                            So because of Qt my intel HD uses ANGLE renderer and my tool isn't working maybe because of ANGLE? Is this the Problem?
                            How can I check what context version and profile my OpenGL-Widget is requesting?


                            Update:
                            I tried to force Qt to use the native-OpenGL Modus for the Intel HD by adding this to the main: Qt::AA_UseDesktopOpenGL;

                            but it still uses ANGLE...

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SebastianFFM81
                              wrote on 23 Jul 2016, 15:48 last edited by
                              #14

                              Solved:
                              So i added this to the main.cpp:
                              QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
                              instead of:
                              Qt::AA_UseDesktopOpenGL;

                              and now i get rid of the ANGLE driver:

                              Context valid: true
                              Really used OpenGl: 3 . 1
                              OpenGl information: VENDOR: Intel
                              RENDERDER: Intel(R) HD Graphics 3000
                              VERSION: 3.1.0 - Build 9.17.10.4229
                              GLSL VERSION: 1.40 - Intel Build 9.17.10.4229

                              And now it's working, big thx for your help and for the context version suggestion, that was the key...

                              1 Reply Last reply
                              0
                              • Chris KawaC Offline
                                Chris KawaC Offline
                                Chris Kawa
                                Lifetime Qt Champion
                                wrote on 23 Jul 2016, 19:14 last edited by
                                #15

                                Great that you found the flag. Since version 5.5 Qt on Windows does that dynamic choosing of the OpenGL driver. Since you always want the desktop version you can also build Qt yourself with a configure option -opengl desktop. This would disable ANGLE support entirely so that you wouldn't need the flag and also shrink the library a bit and reduce the number of dependencies for deployment.

                                1 Reply Last reply
                                1

                                1/15

                                18 Jul 2016, 13:26

                                • Login

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