[Development] OpenGL in Qt 5.1 and onwards

Yves Bailly yves.bailly at sescoi.fr
Mon Jan 7 09:21:51 CET 2013


Le 07/01/2013 09:13, Sletta Gunnar a écrit :
>> Le 18/12/2012 14:34, Sean Harmer a écrit :
>>> I would like to start a discussion on the future level of support for OpenGL
>>> enablers in Qt for those that are interested. So here goes...
>>
>> This may be a bit off-topic, but I have a little concern when reading the
>> Qt5 doc about OpenGL support... it is said here and there that the "old"
>> QGLFormat, QGLContext, ... classes are deprecated and should no longer be
>> used.
>>
>> However, there's no alternative when using QGLWidget, so are they really
>> deprecated or in some kind of "not-yet-deprecated-but-soon" state?
>>
>> Or did I miss something?
>
> What we have done in Qt 5 is to move most of what is in QtOpenGL into QtGui under
> new names. The "old" classes in the QtOpenGL will continue to work and will not go
> away anytime soon, so you can safely continue using them if you are already using
> them for existing code.
>
> We do however promote using QWindow, QOpenGLContext and QOpenGLFormat classes in
> QtGui for new code. They have cleaner API, are slightly more light-weight and support
> one OpenGL context for multiple surfaces if that is interesting for you. The QOpenGL
> module is implemented in terms of the classes in QtGui so they do interoperate.

Thanks for the clarification. I've had a look at the examples, however QWindow is
(for now) of little interest for me, as I'm working on a desktop app, where an OpenGL
widget is just an element among others of the overall GUI. Whereas QWindow and others
are made for GL-only GUIs (no QWidgets), if I understood things well.

Regards,

-- 
      /- Yves Bailly - Software developper  -\
      \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."



More information about the Development mailing list