[Qt5-feedback] Creating an OpenGL Context Window
lars.knoll at nokia.com
lars.knoll at nokia.com
Thu May 12 21:23:58 CEST 2011
That's the idea currently. The functionality of QtOpenGL will most likely
end up in QtGui (and partially in QtWidgets).
Lars
On 5/12/11 5:43 PM, "ext Keith Gardner" <kgardner at zebraimaging.com> wrote:
>If OpenGL is going to be used to draw all widgets, what will happen to
>the QtOpenGL5.dll. Will this binary go away and the functionality be
>integrated into the QtGui4.dll?
>
>Keith
>
>-----Original Message-----
>From: gunnar.sletta at nokia.com [mailto:gunnar.sletta at nokia.com]
>Sent: Thursday, May 12, 2011 9:48 AM
>To: Keith Gardner
>Cc: qt5-feedback at qt.nokia.com
>Subject: Re: [Qt5-feedback] Creating an OpenGL Context Window
>
>
>On May 12, 2011, at 3:45 PM, ext Keith Gardner wrote:
>
>> I have a few questions about writing an OpenGL app.
>>
>> 1. I was wondering how Qt will handle creating an QGLWidget
>>context window on top of a main window which is also an OpenGL context?
>
>It will be a separate window handle, stacking over the Qt root window in
>the native windowing system. They will live "separate lives" you might
>say. Alternative option is to integrate via an FBO, in which case you get
>integrated with QML transitions, clipping and opacity and all the nice
>stuff.
>
>> 2. How will the application be able to differentiate between
>>which context to perform the draw calls?
>
>The QGLWidget has a paintGL call. That will be called when the
>user-context is current and when Qt needs to draw its surface, it will
>make its context current and draw that. Scene graph has a rendering
>thread, so in practice the user GL widget would stay current in the GUI
>thread while scene graph would stay current in the rendering thread.
>
>I don't see this changing in any way. There are specific times when each
>context gets to draw.
>
>> 3. Also, how will Qt perform 2D painting on top of a QGLWidget in
>>Qt5?
>
>Same as in Qt4. If you open a QPainter on a QGLWidget it will render
>using OpenGL.
>
>-
>Gunnar
>
>_______________________________________________
>Qt5-feedback mailing list
>Qt5-feedback at qt.nokia.com
>http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
More information about the Qt5-feedback
mailing list