Hello,

Yes, check the profile too. Additionally, starting from 5.3, we have a useful 
example in qtbase/examples/opengl/contextinfo that can be used to check what 
kind of context is returned for a given version, profile and options 
combination.

   Gl_Widget glw;
   glw.show();

Here you are asking for OpenGL 2.0. You get a 4.4 compatibility profile 
context. This is just fine. The driver is free to give you 2.0, 2.1, or a 
compatibility profile of 3.2, 3.3, 4.x.

   fmt.setVersion(4, 4);
   fmt.setProfile(QGLFormat::CoreProfile);

Here you are asking for 4.4 core profile and that's exactly what you are 
getting. Are the app's OpenGL shaders and calls prepared to handle core profile?

   fmt.setVersion(3, 3);
   fmt.setProfile(QGLFormat::CoreProfile);

Similarly to the previous, you get 3.3 core.

   fmt.setVersion(2, 1);

Again, it gives you 4.4 compatibility.

   fmt.setProfile(QGLFormat::CoreProfile);

This is again 4.4 compatibility (not core) since you are requesting 2.0 core 
which does not make sense so the profile is ignored.

Best regards,
Laszlo

________________________________________
From: interest-bounces+laszlo.agocs=digia....@qt-project.org 
[interest-bounces+laszlo.agocs=digia....@qt-project.org] on behalf of Giuseppe 
D'Angelo [giuseppe.dang...@kdab.com]
Sent: Thursday, July 24, 2014 2:49 PM
To: interest@qt-project.org
Subject: Re: [Interest] OpenGL weirdness

Hello,

Il 24/07/2014 14:13, Yves Bailly ha scritto:
> Any idea about what's going on? The same thing occures on both MinGW (32bits) 
> and
> Visual C++ 2012 (64bits).

Can you also dump the context profile? Maybe unless you're requesting
both a version >= 3.2 *and* a Core profile, then you're getting a
Compatibility profile.

Regards,
--
Join us Oct 6-8 at BCC Berlin for Qt Developer Days 2014!
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company
Tel. UK +44-1738-450410, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to