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. Qt 5 - OpenGL Problem
QtWS25 Last Chance

Qt 5 - OpenGL Problem

Scheduled Pinned Locked Moved General and Desktop
34 Posts 7 Posters 31.9k 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.
  • Z Offline
    Z Offline
    ZapB
    wrote on 16 Jan 2013, 12:24 last edited by
    #13

    Well, just that you need to compile your own build of the Qt libraries to enable Desktop OpenGL on windows at present. Helpful instructions can be found at http://qt-project.org/wiki/Building_Qt_5_from_Git

    Nokia Certified Qt Specialist
    Interested in hearing about Qt related work

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DamianPrg
      wrote on 16 Jan 2013, 12:25 last edited by
      #14

      http://www.youtube.com/watch?v=K0O6mvD6uk4 - It also can help you :-)

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sierdzio
        Moderators
        wrote on 16 Jan 2013, 12:27 last edited by
        #15

        Qt is a set of libraries and tools. What you download from Qt Project web site is - most probably - a pack of precompiled libraries, ready to be used. Necessarily, this general package is compiled with default, fit-for-all settings.

        However, Qt is a big project, and can be compiled in thousands of ways (by passing flags to configure script) and for some usages it's better to define those flags as you want to.

        Qt Project is open sourced, you can download sources yourself and take a look ("link":http://qt-project.org/wiki/Building_Qt_5_from_Git).

        EDIT whoosh, I was waaaay too slow on this one ;)

        (Z(:^

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DamianPrg
          wrote on 16 Jan 2013, 12:31 last edited by
          #16

          @

          C:\qt5>configure -developer-build -opensource -opengl desktop -nomake examples -
          nomake tests

          • C:/qt5/qtbase/configure -developer-build -opensource -opengl desktop -nomake e
            xamples -nomake tests
            'C:\qt5\qtbase\configure.exe' is not recognized as an internal or external comm
            and,
            operable program or batch file.
            *** qtbase/configure exited with non-zero status.

          C:\qt5>
          @

          This is what I get when I try to configure. Note that i have Perl, Python installed. Source code is downloaded from http://qt-project.org/downloads

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sierdzio
            Moderators
            wrote on 16 Jan 2013, 12:34 last edited by
            #17

            On Windows, you need to rdowload the .zip file, not tarball. Also, I think you need to run configure.exe, not the configure script. I'm using Linux, though, this info is second-hand at best ;)

            (Z(:^

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              ZapB
              wrote on 16 Jan 2013, 12:35 last edited by
              #18

              Probably best to get a git clone as it is easier to get back to a clean state. Also it makes sure you have the same exact source tree as the Qt devs so it's easier to trouble shoot. The packaging may remove some files needed to do a fresh build. Does the configure.exe actually exist at that path?

              Nokia Certified Qt Specialist
              Interested in hearing about Qt related work

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DamianPrg
                wrote on 16 Jan 2013, 12:39 last edited by
                #19

                [quote author="sierdzio" date="1358339671"]On Windows, you need to rdowload the .zip file, not tarball. Also, I think you need to run configure.exe, not the configure script. I'm using Linux, though, this info is second-hand at best ;)[/quote]

                I tried ZIP, but it wont extract on my PC. Do you think thats problem? Because Tarball is often used on linux?

                @ZapB - Does the configure.exe actually exist at that path?

                No, just .bat and one with no extenstion.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sierdzio
                  Moderators
                  wrote on 16 Jan 2013, 12:45 last edited by
                  #20

                  Qt packaging strips tarballs of things that are not needed on unix (so, Windows stuff is missing there), and uses unix line endings. So you need the .zip.

                  As ZapB mentioned, using git is a much better idea.

                  (Z(:^

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    DamianPrg
                    wrote on 16 Jan 2013, 12:52 last edited by
                    #21

                    Ok thanks, guys. I will install from there.

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      DamianPrg
                      wrote on 16 Jan 2013, 14:20 last edited by
                      #22

                      Ok, i downloaded source from GitHub, and I have new problem.

                      @

                      C:\Users\Damian\Documents\GitHub\qt5>configure -developer-build -opensource -ope
                      ngl desktop -nomake examples -nomake tests

                      • C:/Users/Damian/Documents/GitHub/qt5/qtbase/configure -developer-build -openso
                        urce -opengl desktop -nomake examples -nomake tests
                        Please wait while bootstrapping configure ...
                        <srcbase> = C:/Users/Damian/Documents/GitHub/qt5/qtbase
                        <outbase> = C:/Users/Damian/Documents/GitHub/qt5/qtbase
                        No suitable compiler found in PATH. Aborting.
                        *** qtbase/configure exited with non-zero status.

                      C:\Users\Damian\Documents\GitHub\qt5>
                      @

                      I have VS10 Pro, VS11 Pro, so why it says "No suitable compiler found in PATH", should I add VS to PATH, or what?

                      1 Reply Last reply
                      0
                      • Z Offline
                        Z Offline
                        ZapB
                        wrote on 16 Jan 2013, 14:33 last edited by
                        #23

                        Run configure from a MS VS10 command prompt so that the environment variables are set up to find the compiler etc on the %PATH%

                        Nokia Certified Qt Specialist
                        Interested in hearing about Qt related work

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DamianPrg
                          wrote on 16 Jan 2013, 14:39 last edited by
                          #24

                          Ok, configure works, thanks for the help.

                          1 Reply Last reply
                          0
                          • U Offline
                            U Offline
                            utcenter
                            wrote on 16 Jan 2013, 15:46 last edited by
                            #25

                            Hey, wouldn't it be far better if solutions for both ANGLE and desktop OpenGL are being built and switching is runtime like the QPA plugin works? Same for QWidgets without OpenGL dependencies.

                            Even if OpenGL is buried deep into QtGui, it should still be possible to patch it in as a dynamic library. After all, even having 3 different version of QtGui is better than having 3 different version of Qt plus the time to build those.

                            1 Reply Last reply
                            0
                            • Z Offline
                              Z Offline
                              ZapB
                              wrote on 16 Jan 2013, 16:03 last edited by
                              #26

                              Yes but that's a lot of work and requires somebody to do it.

                              Nokia Certified Qt Specialist
                              Interested in hearing about Qt related work

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                DamianPrg
                                wrote on 16 Jan 2013, 18:05 last edited by
                                #27

                                Ok, compiled. I relaunched my project - run qmake. And when I want to build/run I get.

                                @
                                c:\users\damian\documents\github\qt5\qtbase\src\opengl\qgl.h:70: error: C1083: Cannot open include file: 'GLES2/gl2.h': No such file or directory
                                @

                                which is right, because I added -opengl desktop, so i should use desktop opengl, so why it want to include GLES?

                                now i get
                                @:-1: error: LNK1104: cannot open file 'libEGLd.lib'@

                                1 Reply Last reply
                                0
                                • U Offline
                                  U Offline
                                  utcenter
                                  wrote on 16 Jan 2013, 20:08 last edited by
                                  #28

                                  Even if you compiled to use desktop OpenGL, GLES is still crucial as it is the compatibility layer Qt relies on across different platforms. What you did essentially allows YOU to use desktop OpenGL if avaiable, there is no separate implementation of the functionality Qt relies on internally. EGL fits in that context as well.

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    DamianPrg
                                    wrote on 16 Jan 2013, 20:21 last edited by
                                    #29

                                    Ok I try to restore old GLES files. Thanks

                                    1 Reply Last reply
                                    0
                                    • Z Offline
                                      Z Offline
                                      ZapB
                                      wrote on 16 Jan 2013, 20:30 last edited by
                                      #30

                                      [quote author="utcenter" date="1358366924"]Even if you compiled to use desktop OpenGL, GLES is still crucial as it is the compatibility layer Qt relies on across different platforms. What you did essentially allows YOU to use desktop OpenGL if avaiable, there is no separate implementation of the functionality Qt relies on internally. EGL fits in that context as well.[/quote]

                                      Sorry but that is incorrect. Qt can use either OpenGL ES 2 and EGL or Desktop GL and WGL (on Windows). Check the source code of the windows qpa plugin for confirmation. It will use whichever GL it has been compiled for. So in this case it should be using the desktop GL.

                                      DamianPrg, for some reason it seems that you project is still trying to link to the old setup. Stale makefiles perhaps? Are you sure you are using the correct Qt build? i.e. is your new qmake the first in your %PATH%?

                                      Did configure say that it was building for Desktop OpenGL?

                                      Nokia Certified Qt Specialist
                                      Interested in hearing about Qt related work

                                      1 Reply Last reply
                                      0
                                      • U Offline
                                        U Offline
                                        utcenter
                                        wrote on 16 Jan 2013, 22:20 last edited by
                                        #31

                                        My bad, an incorrect assumption.

                                        Also, it seems that the "default" Qt5 offline package for windows will switch to desktop OpenGL in the near future, which makes good sense. Unfortunately, that won't happen in 5.0.1

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          DamianPrg
                                          wrote on 17 Jan 2013, 12:43 last edited by
                                          #32

                                          I will just wait for new Qt release. Anyway thanks Guys for help.

                                          1 Reply Last reply
                                          0

                                          22/34

                                          16 Jan 2013, 14:20

                                          • Login

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