Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Use Qt to create a HUD / GUI inside an OpenGL Widget?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Game Development
4 Posts 4 Posters 8.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrR7
    wrote on last edited by
    #1

    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 :(

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      ZapB
      wrote on last edited by
      #2

      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.

      Nokia Certified Qt Specialist
      Interested in hearing about Qt related work

      1 Reply Last reply
      0
      • T Offline
        T Offline
        terenty
        wrote on last edited by
        #3

        "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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sreich
          wrote on last edited by
          #4

          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.

          Software Developer for KDE

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved