[Qt-interest] How does Qt manage the OpenGL multiple render contexts

Rainer Wiesenfarth Rainer.Wiesenfarth at inpho.de
Tue Oct 20 09:16:16 CEST 2009


It has been some time since I did OpenGL basiscs in Qt, so I might be wrong
in some places. Feel free to correct me!

From: Joe Liu
> I just want to learn more detail about Qt OpenGL;
> 
> Does it create new thread for each QGLWidget? 

No, all widgets are created in the main thread, and OpenGL rendering usually
takes place in the same thread context. However, multi-threaded OpenGL
rendering is possible. There is an article about it in Qt Quarterly issue 6
(Q2/2003, pp. 6ff) which should still be valid.

> Otherwise, how can it know what state of which RC the user 
> are trying to modify;

Each widget may have its own rendering context, but may also share the
context with other widgets. Take a look at the QGLWidget constructors for
details.

> merely out of curiosity;
> 
> BTW, is the Qt OpenGL a new implementation, like glew or 
> anything else? 

No, Qt OpenGL support is a wrapper around the OS'es OpenGL support, ...

> And does Qt OpenGL support the latest GL features, like V2.0?

... thus it supports nothing more or less than the platform supports.

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
INPHO GmbH * Smaragdweg 1 * 70174 Stuttgart * Germany
phone: +49 711 2288 10 * fax: +49 711 2288 111 * web: www.inpho.de
place of business: Stuttgart * managing director: Johannes Saile
commercial register: Stuttgart, HRB 9586
Leader in Photogrammetry and Digital Surface Modelling
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3438 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091020/7896b1f8/attachment.bin 


More information about the Qt-interest-old mailing list