Hi Andy,
In your main, set up the desired QSurfaceFormat, use it to try to create
a context, and check the results. If that works great, destroy it and
carry on with that as the default surface format. Otherwise, drop down a
level and try again until you find a surface format that works.
Cheers,
Sean
On 17/09/2018 17:57, Andy wrote:
I seem to have a catch-22.
- QSurfaceFormat::setDefaultFormat() needs to be called before
application construction.
- I want multisampling on a 3.3 context by default, so I need to call
QSurfaceFormat::setSamples().
- I can't know how many samples are supported until after application
construction by actually creating a context and asking how many it
supports. (Or can I somehow?)
- If I just setSamples() to the number I want (8) and call
setDefaultFormat, then any card/driver that doesn't support that many
samples fails to be created and I end up with a 2.0 default context.
Any ideas?
---
Andy Maloney // https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest