Qt-interest Archive, May 2007
GL Widget and context switching
Message 1 in thread
I have an application with multiple QGLWidgets (they're showing real-time
graphs). I also have a QSlider connected to each QGLWidget (via
signal-slot), so that when the slider is moved, the zoom scale on the
GLWidget changes in real time. The issue that I'm experiencing is that when
the graphs are plotting data and I start moving the slider, the slider not
only affects the GLWidget that it is connected to, but it also affects other
GLWidgets (and it's not consistent, sometimes they're unaffected, sometimes
the zooming is drastic, etc). Does this have anything to do with GL context
switching?
Thank you,
Cesar
--
[ signature omitted ]
Message 2 in thread
Hi,
It might be context switching; you should use QGLWidget::makeCurrent() in
your slot (and other) functions before using any OpenGL calls. Only in the
standard InitGL(), PaintGL() and ResizeGL() this isn't necessary, because
Qt takes care of selecting the right context.
See QGLWidget docs.
Marc
qt-interest-request@xxxxxxxxxxxxx wrote on 17-05-2007 00:57:26:
> I have an application with multiple QGLWidgets (they're showing
real-time
> graphs). I also have a QSlider connected to each QGLWidget (via
> signal-slot), so that when the slider is moved, the zoom scale on the
> GLWidget changes in real time. The issue that I'm experiencing is that
when
> the graphs are plotting data and I start moving the slider, the slider
not
> only affects the GLWidget that it is connected to, but it also affects
other
> GLWidgets (and it's not consistent, sometimes they're unaffected,
sometimes
> the zooming is drastic, etc). Does this have anything to do with GL
context
> switching?
>
> Thank you,
>
> Cesar
>
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>