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

Samuel Rødal sroedal at trolltech.com
Tue Oct 20 09:16:48 CEST 2009


Joe Liu wrote:
> Hi,
> 
> I just want to learn more detail about Qt OpenGL;
> 
> Does it create new thread for each QGLWidget?
> Otherwise, how can it know what state of which RC the user are trying to 
> modify;
> 
> merely out of curiosity;
> 
> BTW, is the Qt OpenGL a new implementation, like glew or anything else?
> And does Qt OpenGL support the latest GL features, like V2.0?
> 
> 
> Thanks
> 
> 
> Joe

Each QGLWidget has its own GL context, which is wrapped by the class 
QGLContext and made current before issuing OpenGL commands using 
QGLWidget::makeCurrent().

Qt OpenGL doesn't resolve and expose OpenGL function pointers like GLEW 
does. You can quite easily use GLEW in combination with Qt OpenGL though.

--
Samuel



More information about the Qt-interest-old mailing list