[Qt-interest] QGLFormat Version Difference
Dean Glazeski
dnglaze at gmail.com
Fri Jun 10 15:55:06 CEST 2011
Hello everyone,
I was recently playing around with QGLWidget and sharing and ran into a bit
of a problem. When I first create the shared QGLWidget and have it share
with another created at the same time, both QGLFormats are exactly the same
reporting that the OpenGL version is 2.1. When I later create another
QGLWidget that uses the same shared QGLWidget, the formats are not the same
and so sharing is unable to occur. The only difference is that QGLFormat is
reporting an OpenGL version of 3.3 instead of 2.1 in the new widget while
the shared widget is still showing 2.1. Once the new widget makes it to the
initializeGL function, the format has been corrected and now correctly
matches the shared widget's QGLFormat showing a version of 2.1.
As a test, I created more than one QGLWidget at the same time and validated
that sharing properly occurs in this case as well. There just appears to be
some kind of strange hiccup if I try to share a widget with a new one once
that shared widget is already actively displaying a scene.
Some possible, albeit not very clean, solutions I was considering was to
either recreate each widget whenever I need to add another that shares using
the same shared widget or to some how update the context in the new widget
once I now it matches the shared widget format. Can any one provide a
better alternative or shed some light on what I may be doing wrong?
I am using Qt 4.7.2 and my OpenGL version is being reported as 2.1.2 by
glGetString(GL_VERSION).
Thanks.
// Dean Glazeski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110610/bfb444fe/attachment.html
More information about the Qt-interest-old
mailing list