Qt 5 - OpenGL Problem
-
wrote on 10 Jan 2013, 21:06 last edited by
[quote author="ZapB" date="1357849860"]If you are writing new code then I would also recommend avoiding the old fixed function pipeline stuff. Note that some vendors (notably Apple) do not implement the compatibility profile. So if you need a 3.2 context on OS X you can only use the Core profile. Just something to bear in mind.[/quote]
Anyway if i want to use OpenGL 3.2+, i need compiile qt by myself.
-
wrote on 16 Jan 2013, 12:20 last edited by
Hi guys!
I've got exactly the same problem as DamianPrg.
Maybe this is a stupid question, but I am a very beginner, anyway : what do you mean by saying that you need to compile Qt by yourself ?
-
wrote on 16 Jan 2013, 12:22 last edited by
[quote author="mgonzalo" date="1358338826"]Hi guys!
I've got exactly the same problem as DamianPrg.
Maybe this is a stupid question, but I am a very beginner, anyway : what do you mean by saying that you need to compile Qt by yourself ?
[/quote]
You can compile it by yourself, I tried but didn't work. Some problem with configure.
Or you can wait for next release of Qt 5, and maybe there will be OpenGL desktop instead of GL ES 2.Note: If you want compile it by yourself, it will take some time, on good machine about 1h :-)
-
wrote on 16 Jan 2013, 12:24 last edited by
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
-
wrote on 16 Jan 2013, 12:25 last edited by
http://www.youtube.com/watch?v=K0O6mvD6uk4 - It also can help you :-)
-
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 ;)
-
wrote on 16 Jan 2013, 12:31 last edited by
@
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
- C:/qt5/qtbase/configure -developer-build -opensource -opengl desktop -nomake e
-
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 ;)
-
wrote on 16 Jan 2013, 12:35 last edited by
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?
-
wrote on 16 Jan 2013, 12:39 last edited by
[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.
-
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.
-
wrote on 16 Jan 2013, 12:52 last edited by
Ok thanks, guys. I will install from there.
-
wrote on 16 Jan 2013, 14:20 last edited by
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?
- C:/Users/Damian/Documents/GitHub/qt5/qtbase/configure -developer-build -openso
-
wrote on 16 Jan 2013, 14:33 last edited by
Run configure from a MS VS10 command prompt so that the environment variables are set up to find the compiler etc on the %PATH%
-
wrote on 16 Jan 2013, 14:39 last edited by
Ok, configure works, thanks for the help.
-
wrote on 16 Jan 2013, 15:46 last edited by
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.
-
wrote on 16 Jan 2013, 16:03 last edited by
Yes but that's a lot of work and requires somebody to do it.
-
wrote on 16 Jan 2013, 18:05 last edited by
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'@ -
wrote on 16 Jan 2013, 20:08 last edited by
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.
-
wrote on 16 Jan 2013, 20:21 last edited by
Ok I try to restore old GLES files. Thanks
19/34