QT 5.1: Pure desktop OpenGL in widget?
-
Hi,
I’am currently working on 3D editor: I need scene combined with system GUI. Something like my previous editor based on QT 4.x: www.youtube.com/watch?v=__EGoLDSBv8.-
Qt 5.1 have different approach to OpenGL. As I understood, it is recommended to use QWindow. But it is just a window, I need widget (QGLWidget), but it is deprecated. Why? It’s there different way to have opengl viewport in widget?
-
Second question is about Angle and OpenGL|ES. For my editor, I preffer pure desktop OpenGL, how can I force QT to use it?
Thanks!
-
-
Hi,
Please don't post the same thread in multiple sub-forum, one is enough
"Duplicate":http://qt-project.org/forums/viewthread/33021/
-
Sorry, I don't know, which forum is better for this topic.
-
bq. 2) ...Angle and OpenGL|ES. For my editor, I preffer pure desktop OpenGL, how can I force QT to use it?
You mean Qt ;-)
I would like to do the same at some point probably, but I didn't do it so far. Still, I think the answer to this lies in how you configure the Qt libraries to be built.
-
For that question it should be:
@configure -opengl desktop@
-
Thanks S :-) Just need to find the time...
-
Instead of using QGLWidget (this will see no further development but a direct replacement for it is planned probably for 5.3), what you can do is as you say to use QWindow + QOpenGLContext for your GL content. You cna then embed this into your widget-based application using QWidget::createWindowContainer( myGLWindow ). See http://doc-snapshot.qt-project.org/qt5-release/qtwidgets/qwidget.html#createWindowContainer
-
Thank You ZapB! This looks very usable!
SGaist: thanks, I found this solution to. But I considered, OpenGL|ES is sufficient for my project, finally.
-
OK good. By the way, for particle effects, you will be able to get much better performance by making use of desktop OpenGL facilities such as transform feedback objects which allow you to perform the particle updates on the GPU.
-
Yes, I used desktop OpenGL many years in game development. Furtunately, this new project is only editor for physical objects. I need only model and lot of gizmos :-). Performance is minor. But thank you for this notice.
-
Ah sorry I misunderstood. I thought you were doing more work on your original editor (which looks very cool btw). Have fun!
-
Thank you :-)