[Qt-interest] OpenGL Regression on Qt 4.7
Richard S. Wright Jr.
rwright at starstonesoftware.com
Thu Feb 17 17:25:03 CET 2011
The new OpenGL context creation code is very awkward to use, and has caused some regressions in our code.
There needs to be a simple way to ask for the latest version of OpenGL without having to use QGLFormat::setVersion() and specifying a specific version, with the fallback being a 1.x context. If I do nothing, my existing code always gives me the latest OpenGL version on ATI drivers (Windows here). On NVidia drivers, I get a 2.1 context, even if it's a 3.x or 4.0 capable driver. This is new behavior since updating our Qt library from 4.5.3 to 4.7.1 on Windows. If QGLFormat.setVersion fails, it should select the latest available compatibility profile context, not a 2.x (the documentation says 1.x, but it's actually going back to 2.1 in those cases it fails). I have multiple code paths based on which version of OpenGL is available. Testing each version of OpenGL individually seems kind of silly every time I need to create an OpenGL widget.
It seems a safer approach would be that if I don't call GQLFormat.setVersion then it will default to the latest available version supported by the driver (this also would not have broken my existing code). Only IF I want some earlier version (and why as an OpenGL ISV I would INSIST on a 3.0 context and NOT a 3.3 or 4.0 context is beyond me), would I call setVersion.
The whole QGLFormat::OpenGLVersionFlags thing... really? It makes more sense to have OpenGL_Version_1_1, OpenGL_Version_1_2, OpenGL_Version_1_3, ... etc. than to just have a getMajorVersion() and getMinorVersion() function calls?
Richard
On Feb 17, 2011, at 10:13 AM, Till Oliver Knoll wrote:
> Hi,
>
> Am 17.02.2011 um 15:44 schrieb Duane Hebert <duaneh at nitrex.com>:
>
>> My group wanted to switch to 4.7.1 for Windows. I found an exe to
>> install but it was for VS 2008. We use VS 2005.
>
> Ha ha, sorry my chuckle here ;) That comes from previous discussions on this list where people were wondering why Qt still only ships binaries for VS 2008 and not 2010 yet - and then comes you asking for 2005 binaries! Oh by the way, did you mean the stock 2005 or SP1? And IIRC there was still some kind of hotfix (the ATL issue?) which introduced yet another C/C++ runtime incompatibility ;)
>
>> I used that, ran the
>> installation and found that my dlls wouldn't work so I did the
>> configure/nmake and it seems fine.
>
> I think "officially" Qt 4.7 grogs with VS 2008 (SP?), likely Qt 4.8 will also (exclusively?) ship binaries for VS 2010.
>
>
>> Is there no longer an installation for VS2005? What is the preferred
>> method to do this?
>>
> For all other VS compiler flavours you need to compile Qt yourself. And off course use the SAME compiler for everything else, too (3rd party libs, your own code...)
>
>> I zipped the installation and let my colleagues copy it.
>
> Unless you unzip it to the EXACT same location (e.g. C:\Qt\4.7.1) this will fail: during compilation paths are hardcoded inside the Qt binaries, so one can't simply move the SDK around.
>
> Cheers, Oliver
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110217/eda5a65b/attachment.html
More information about the Qt-interest-old
mailing list