Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Newbie here - OpenGL Cubes example problems on Windows



  • Hello all,
    I'm testing out QT Creator, I download everything (studio, creator, documentation, etc) which takes up ~30 gigs. Ok, fine, spend an hour and make some room and install.

    I start up Creator and pick the OpenGL Cubes example and try to build - oops, error, QT must be configured with "-opengl desktop"! So, I navigate to the QT source, run ".\configure blah blah -opengl desktop" for mingw on Windows, which completes fine then says to "mingw32-make" then "mingw32-make install".

    Alright no problem, so I "mingw32-make"......8 HOURS later, I run out of disk space, compilation fails.

    Obviously I'm missing something here. I'm guessing once I ran make after configure I'm building everything from source, examples and all. If I need to do this, then what is the point of downloading the ~30 gig install in the first place? Isnt this all set up already? If I need to deploy with another compiler, I need to do all this over again, is that another ~30 gigs? The documentation is pretty sparse on this stuff and its honestly baffling that I cant just run the examples that come with the kit right out of the box.

    Theres gotta be an easier solution - can anyone help out here? Is there a way to configure without re-running make? I tried to do the ".\configure" stuff then rebuilding in Creator and that didnt work, but I also didnt see any way to configure dynamically in the example .pro file...

    Thanks!



  • @SGaist
    Yeah thats what I did, default install everything, using MinGW on Windows, its telling me to configure QT with "-opengl desktop".

    It looks like the actual issue is the example itself. The other opengl examples seem to be ok.....

    Not sure what the deal is but I guess I can work from there.

    Edit: Fixed the problem, updated the .pro file to more closely match the "cube" example, and included lib opengl32. Works now!


  • Lifetime Qt Champion

    Hi @MAX_SWEAT, welcome.

    My first question is: on which platform are you? I assume you installed Qt through the online installer, is that correct?

    I download everything (studio, creator, documentation, etc) which takes up ~30 gigs.

    I think that is way too much. If you don't want to use 3D Studio (now), why installing it? Also, on Windows Qt is precompiled for different compilers. You only need to download the versions you really want to use.

    For comparison: My /opt/Qt directory is 2.6 GB, but my git/qt5 where I build from git sources is 16 GB (including all the git repo and object files, which are not needed for the final installation).

    Regarding your OpenGL problem - I'm really no expert in that area, but I would assume there is a precompiled version, too. I hope someone else here can help you more.

    Regards



  • Hi, thanks for your help,

    I just downloaded from here: https://www.qt.io/download, the open source version. After you click that button it detects im on Windows and gives me the Qt Online Installer for Windows. I start that up and pick Qt 5.12.1, then the Developer and Designer Tools, which I chose CDB Debugger Support, the Studio, and MinGW - this comes out to ~39 gigs. In my reinstall I didnt choose Qt 5.12.1 - this cuts it down to ~1 gig - apparently I dont need to choose a QT version? Very confusing, and now the Examples are gone, so I'm assuming if I want to see the examples I need to install Qt 5.12.1 and its 30 gigs, then do all the configure and compile again to get a working opengl example.

    Also if I dont choose a version of Qt, of course I cant make any projects since its missing qmake - so this appears to just be downloading the IDE. I'll look around for precompiled versions of things but this is just bizarre that I need to apparently download a 30 gig setup (through the front facing installer) to do basic things.

    thanks for your help.


  • Lifetime Qt Champion

    Hi @MAX_SWEAT,

    Yeah, you must select at least one Qt version for one compiler - in your case probably MinGW, as you installed that too.

    This is how it looks for me on Linux:

    0_1550939484435_Bildschirmfoto von 2019-02-23 17-29-20.png

    On Windows, you probably have a lot more compilers below 5.12.1, that's why it sums up to 30 GB.

    I'll also edit your topic title to attract more help.

    Regards



  • Yeah I went through and installed the QT version and kept out the sources folder and some UWP stuff I wont use, however same issue.

    I'm going to try using the Visual Studio kit instead, perhaps mingw is missing opengl features.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    No, the MinGW edition supports OpenGL the same way as the Visual Studio edition. Not knowing what build of Qt you used to build the OpenGL application, I can't comment on that.

    The most simple way to start hacking with Qt with no special tools installed (meaning Visual Studio). Install the MinGW Qt version as well as the MinGW compiler provided by the installer.



  • @SGaist
    Yeah thats what I did, default install everything, using MinGW on Windows, its telling me to configure QT with "-opengl desktop".

    It looks like the actual issue is the example itself. The other opengl examples seem to be ok.....

    Not sure what the deal is but I guess I can work from there.

    Edit: Fixed the problem, updated the .pro file to more closely match the "cube" example, and included lib opengl32. Works now!


  • Lifetime Qt Champion

    Hi @MAX_SWEAT,

    glad you got it working!

    Can you show us the updated pro file?

    I'd like to fix the example so it works out of the box. Thanks


Log in to reply