Use Qt to create a HUD / GUI inside an OpenGL Widget?



  • Hey guys!

    I have a question. Is there a way, to actually use Qt to create a HUD / GUI inside an GLWidget, inbetween the OpenGL Code? :S

    EDIT: It's funny. I saw "this":http://www.youtube.com/watch?feature=player_embedded&v=YqlaKY0a1hg#! video on the "Introduction to Qt5" (which I am actually already using) page. So it is possible, I just don't know how :(



  • Hi, this video shows the basic approach of how to do it in the case of QQ2 HUD over an OpenGL scene http://www.youtube.com/watch?v=GYa5DLV6ADQ

    If you have specific questions after watching that then please come back to me.



  • "OpenglUnderQml ":http://qt-project.org/doc/qt-5.0/qtquick/scenegraph-openglunderqml.html demonstartes a way to mix OpenGL and QtQuick2 scene which is a way to make HUD on top of OpenGL



  • i'm actually in the process of porting my (previously sdl and pure gl 3.0+) game to qt 5 and using qml2 for the ui. it looks awesome so far, and it's made things so much easier.

    i highly recommend it. My code's here in a branch, http://github.com/sreich/ore-infinium if you're interested in it. I am currently running into an issue surrounding key events and implicit (qt event) threading though.

    Other than that, it's been great and I haven't had performance issues as I expected. Not only that, out of the box qml2 is better at performance than e.g. librocket, which was what i was previously using. not to mention way, way, way easier and efficient to develop for. And qt 5.2 is supposed to bring some real big yields in the optimization for rendering part of qt quick. (e.g. reducing draw calls, overdraw, texture switches, etc.)

    So in the end it should result in really big wins for me.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.