Qt 5 - OpenGL Problem
-
The fixed function pipeline is left only for the sake of backward compatibility, only for code that already exists, if you write new code, it is very counter-productive to use it. You don't really gain anything by using it, you lose out on many features that are beneficial even in 2d, and in many cases, performance is actually worse, plus you lose portability.
-
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 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.
-
[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 :-)
-
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
-
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 ;)
-
@
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 ;)
-
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?
-
[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.
-
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
-
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.
-
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'@